
;;;; dtype

; ---------------------------
; C and C++ type definitions
; ---------------------------
;CALLBACK                    typedef PROTO STDCALL
;WINAPI                      typedef PROTO STDCALL

; 8 bit   BYTE
; ~~~~~
;CHAR                        typedef BYTE
;UCHAR                       typedef BYTE
;;; TBYTE                       typedef BYTE ; naming conflist with MASM data type

;if UNICODE eq TRUE
;    TCHAR                       typedef WORD
;else
;    TCHAR                       typedef BYTE
;end if
;
;bool                        typedef BYTE
;BOOLEAN                     typedef BYTE

; 16 bit  WORD
; ~~~~~~
;;; SHORT                       typedef WORD
;USHORT                      typedef WORD
;ATOM                        typedef WORD
;WCHAR                       typedef WORD
;LANGID                      typedef WORD
;OLECHAR                     typedef WORD
;FILEOP_FLAGS                typedef WORD

; 32 bit  DWORD
; ~~~~~~
;ABORTPROC                   typedef DWORD
;ACCESS_MASK                 typedef DWORD
;ACMDRIVERENUMCB             typedef DWORD
;ACMDRIVERPROC               typedef DWORD
;ACMFILTERCHOOSEHOOKPROC     typedef DWORD
;ACMFILTERENUMCB             typedef DWORD
;ACMFILTERTAGENUMCB          typedef DWORD
;ACMFORMATCHOOSEHOOKPROC     typedef DWORD
;ACMFORMATENUMCB             typedef DWORD
;ACMFORMATTAGENUMCB          typedef DWORD
;NET_API_STATUS              typedef DWORD
;API_RET_TYPE                typedef DWORD
;APPLET_PROC                 typedef DWORD
;BOOL                        typedef DWORD
;CALINFO_ENUMPROC            typedef DWORD
;COLORREF                    typedef DWORD
;;; CONST                       typedef DWORD   ; naming conflist with MASM reserve word
;;; CRITICAL_SECTION            typedef DWORD   ; naming conflist with structure
;CTRYID                      typedef DWORD
;DATEFMT_ENUMPROC            typedef DWORD
;DESKTOPENUMPROC             typedef DWORD
;DLGPROC                     typedef DWORD
;DRAWSTATEPROC               typedef DWORD
;EDITWORDBREAKPROC           typedef DWORD
;ENHMFENUMPROC               typedef DWORD
;ENUMRESLANGPROC             typedef DWORD
;ENUMRESNAMEPROC             typedef DWORD
;ENUMRESTYPEPROC             typedef DWORD
;FARPROC                     typedef DWORD
;FILE_SEGMENT_ELEMENT        typedef DWORD
;FONTENUMPROC                typedef DWORD
;GOBJENUMPROC                typedef DWORD
;GRAYSTRINGPROC              typedef DWORD
;HACCEL                      typedef DWORD
;HANDLE                      typedef DWORD
;HBITMAP                     typedef DWORD
;HBRUSH                      typedef DWORD
;HCOLORSPACE                 typedef DWORD
;HCONV                       typedef DWORD
;HCONVLIST                   typedef DWORD
;HCURSOR                     typedef DWORD
;HDC                         typedef DWORD
;HDDEDATA                    typedef DWORD
;HDESK                       typedef DWORD
;HDROP                       typedef DWORD
;HDWP                        typedef DWORD
;HENHMETAFILE                typedef DWORD
;HFILE                       typedef DWORD
;HFONT                       typedef DWORD
;HGDIOBJ                     typedef DWORD
;HGLOBAL                     typedef DWORD
;HHOOK                       typedef DWORD
;HICON                       typedef DWORD
;HIMAGELIST                  typedef DWORD
;HIMC                        typedef DWORD
;HINSTANCE                   typedef DWORD
;HKEY                        typedef DWORD
;HKL                         typedef DWORD
;HLOCAL                      typedef DWORD
;HMENU                       typedef DWORD
;HMETAFILE                   typedef DWORD
;HMODULE                     typedef DWORD
;HMONITOR                    typedef DWORD
;HOOKPROC                    typedef DWORD
;HPALETTE                    typedef DWORD
;HPEN                        typedef DWORD
;HRGN                        typedef DWORD
;HRSRC                       typedef DWORD
;HSZ                         typedef DWORD
;HTREEITEM                   typedef DWORD
;HWINSTA                     typedef DWORD
;HWND                        typedef DWORD
;;; INT                         typedef DWORD; naming conflist with MASM reserve word
;IPADDR                      typedef DWORD
;LCID                        typedef DWORD
;LCSCSTYPE                   typedef DWORD
;LCSGAMUTMATCH               typedef DWORD
;LCTYPE                      typedef DWORD
;LINEDDAPROC                 typedef DWORD
;LOCALE_ENUMPROC             typedef DWORD
;LONG                        typedef DWORD
;LPARAM                      typedef DWORD
;LPBOOL                      typedef DWORD
;LPBYTE                      typedef DWORD
;LPCCHOOKPROC                typedef DWORD
;LPCFHOOKPROC                typedef DWORD
;LPCOLORREF                  typedef DWORD
;LPCRITICAL_SECTION          typedef DWORD
;LPCSTR                      typedef DWORD
;LPCTSTR                     typedef DWORD
;LPCVOID                     typedef DWORD
;LPCWSTR                     typedef DWORD
;LPDWORD                     typedef DWORD
;LPFIBER_START_ROUTINE       typedef DWORD
;LPFRHOOKPROC                typedef DWORD
;LPHANDLE                    typedef DWORD
;LPHANDLER_FUNCTION          typedef DWORD
;LPINT                       typedef DWORD
;LPLONG                      typedef DWORD
;LPOFNHOOKPROC               typedef DWORD
;LPOLESTR                    typedef DWORD
;LPCOLESTR                   typedef DWORD
;LPPAGEPAINTHOOK             typedef DWORD
;LPPAGESETUPHOOK             typedef DWORD
;LPPRINTHOOKPROC             typedef DWORD
;LPPROGRESS_ROUTINE          typedef DWORD
;LPSETUPHOOKPROC             typedef DWORD
;LPSTR                       typedef DWORD
;LPSTREAM                    typedef DWORD
;LPTHREAD_START_ROUTINE      typedef DWORD
;LPTSTR                      typedef DWORD
;LPVOID                      typedef DWORD
;LPWORD                      typedef DWORD
;LPWSTR                      typedef DWORD
;LRESULT                     typedef DWORD
;;; LUID                        typedef DWORD   ; name conflict with structure
;MCIDEVICEID                 typedef DWORD
;PBOOL                       typedef DWORD
;PBOOLEAN                    typedef DWORD
;PBYTE                       typedef DWORD
;PCHAR                       typedef DWORD
;PCRITICAL_SECTION           typedef DWORD
;PCSTR                       typedef DWORD
;PCTSTR                      typedef DWORD
;PCWCH                       typedef DWORD
;PCWSTR                      typedef DWORD
;PDWORD                      typedef DWORD
;PFLOAT                      typedef DWORD
;PFNCALLBACK                 typedef DWORD
;PHANDLE                     typedef DWORD
;PHANDLER_ROUTINE            typedef DWORD
;PHKEY                       typedef DWORD
;PINT                        typedef DWORD
;PLCID                       typedef DWORD
;PLONG                       typedef DWORD
;PLUID                       typedef DWORD
;PROPENUMPROC                typedef DWORD
;PROPENUMPROCEX              typedef DWORD
;PSHORT                      typedef DWORD
;PSTR                        typedef DWORD
;PTBYTE                      typedef DWORD
;PTCHAR                      typedef DWORD
;PTIMERAPCROUTINE            typedef DWORD
;PTSTR                       typedef DWORD
;PUCHAR                      typedef DWORD
;PUINT                       typedef DWORD
;PULONG                      typedef DWORD
;PUSHORT                     typedef DWORD
;PVOID                       typedef DWORD
;PWCHAR                      typedef DWORD
;PWORD                       typedef DWORD
;PWSTR                       typedef DWORD
;REGISTERWORDENUMPROC        typedef DWORD
;REGSAM                      typedef DWORD
;SC_HANDLE                   typedef DWORD
;SC_LOCK                     typedef DWORD
;SCODE                       typedef DWORD
;SENDASYNCPROC               typedef DWORD
;SERVICE_STATUS_HANDLE       typedef DWORD
;SOCKET                      typedef DWORD
;TIMEFMT_ENUMPROC            typedef DWORD
;TIMERPROC                   typedef DWORD
;UINT                        typedef DWORD
;ULONG                       typedef DWORD
;WINSTAENUMPROC              typedef DWORD
;WNDENUMPROC                 typedef DWORD
;WNDPROC                     typedef DWORD
;WPARAM                      typedef DWORD
;YIELDPROC                   typedef DWORD

; 64 bit
; ~~~~~~
;LONG64                      typedef QWORD
;ULONG64                     typedef QWORD
;INT64                       typedef QWORD
;UINT64                      typedef QWORD
;WORD64                      typedef QWORD
;POINTER_64                  typedef QWORD
;LONGLONG                    typedef QWORD
;ULONGLONG                   typedef QWORD

; Floating point
; ~~~~~~~~~~~~~~
;FLOAT                       typedef REAL4
;DOUBLE                      typedef REAL8
;;; LONG DOUBLE                 typedef REAL10

; ----------------------------------------------

;;;; end dtype

;;;; winbase

INVALID_FILE_ATTRIBUTES          = -1
TIME_ZONE_ID_INVALID             = 0FFFFFFFFh
 ; MoveMemory                       = RtlMoveMemory
 ; CopyMemory                       = RtlCopyMemory
 ; FillMemory                       = RtlFillMemory
 ; ZeroMemory                       = RtlZeroMemory
 ; SecureZeroMemory                 = RtlSecureZeroMemory
FILE_FLAG_OPEN_REPARSE_POINT     = 00200000h
FILE_FLAG_OPEN_NO_RECALL         = 00100000h
FILE_FLAG_FIRST_PIPE_INSTANCE    = 00080000h
PROGRESS_CONTINUE                = 0
PROGRESS_CANCEL                  = 1
PROGRESS_STOP                    = 2
PROGRESS_QUIET                   = 3
CALLBACK_CHUNK_FINISHED          = 00000000h
CALLBACK_STREAM_SWITCH           = 00000001h
COPY_FILE_FAIL_IF_EXISTS         = 00000001h
COPY_FILE_RESTARTABLE            = 00000002h
COPY_FILE_OPEN_SOURCE_FOR_WRITE  = 00000004h
COPY_FILE_ALLOW_DECRYPTED_DESTINATION = 00000008h
REPLACEFILE_WRITE_THROUGH        = 00000001h
REPLACEFILE_IGNORE_MERGE_ERRORS  = 00000002h
PST_MODEM                        = 00000006h
COMMPROP_INITIALIZED             = 0E73CF52Eh
CREATE_UNICODE_ENVIRONMENT       = 00000400h
CREATE_SHARED_WOW_VDM            = 00001000h
CREATE_FORCEDOS                  = 00002000h
BELOW_NORMAL_PRIORITY_CLASS      = 00004000h
ABOVE_NORMAL_PRIORITY_CLASS      = 00008000h
STACK_SIZE_PARAM_IS_A_RESERVATION = 00010000h
CREATE_BREAKAWAY_FROM_JOB        = 01000000h
CREATE_PRESERVE_CODE_AUTHZ_LEVEL = 02000000h
CREATE_DEFAULT_ERROR_MODE        = 04000000h
CREATE_IGNORE_SYSTEM_DEFAULT     = 80000000h
DRIVE_UNKNOWN                    = 0
DRIVE_NO_ROOT_DIR                = 1
MAXINTATOM                       = 0C000h
INVALID_ATOM                     = 0
SCS_64BIT_BINARY                 = 6
FIBER_FLAG_FLOAT_SWITCH          = 1h
SEM_NOALIGNMENTFAULTEXCEPT       = 0004h
HANDLE_FLAG_INHERIT              = 00000001h
HANDLE_FLAG_PROTECT_FROM_CLOSE   = 00000002h
HINSTANCE_ERROR                  = 32
FILE_ENCRYPTABLE                 = 0
FILE_IS_ENCRYPTED                = 1
FILE_SYSTEM_ATTR                 = 2
FILE_ROOT_DIR                    = 3
FILE_SYSTEM_DIR                  = 4
FILE_UNKNOWN                     = 5
FILE_SYSTEM_NOT_SUPPORT          = 6
FILE_USER_DISALLOWED             = 7
FILE_READ_ONLY                   = 8
FILE_DIR_DISALLOWED              = 9
EFS_USE_RECOVERY_KEYS            = 1
CREATE_FOR_IMPORT                = 1
CREATE_FOR_DIR                   = 2
OVERWRITE_HIDDEN                 = 4
FLS_OUT_OF_INDEXES               = 0FFFFFFFFh
BACKUP_INVALID                   = 00000000h
BACKUP_PROPERTY_DATA             = 00000006h
BACKUP_OBJECT_ID                 = 00000007h
BACKUP_REPARSE_DATA              = 00000008h
BACKUP_SPARSE_BLOCK              = 00000009h
STREAM_NORMAL_ATTRIBUTE          = 00000000h
STREAM_CONTAINS_PROPERTIES       = 00000004h
STREAM_SPARSE_ATTRIBUTE          = 00000008h
STARTF_USEHOTKEY                 = 00000200h
LOAD_IGNORE_CODE_AUTHZ_LEVEL     = 00000010h
GET_MODULE_HANDLE_EX_FLAG_PIN    = 00000001h
GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT = 00000002h
GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS = 00000004h
DDD_NO_BROADCAST_SYSTEM          = 00000008h
DDD_LUID_BROADCAST_DRIVE         = 00000010h
FIND_FIRST_EX_CASE_SENSITIVE     = 00000001h
MOVEFILE_WRITE_THROUGH           = 00000008h
MOVEFILE_CREATE_HARDLINK         = 00000010h
MOVEFILE_FAIL_IF_NOT_TRACKABLE   = 00000020h
EVENTLOG_FULL_INFO               = 0
LOGON32_LOGON_NETWORK            = 3
LOGON32_LOGON_UNLOCK             = 7
LOGON32_LOGON_NETWORK_CLEARTEXT  = 8
LOGON32_LOGON_NEW_CREDENTIALS    = 9
LOGON32_PROVIDER_WINNT40         = 2
LOGON32_PROVIDER_WINNT50         = 3
LOGON_WITH_PROFILE               = 00000001h
LOGON_NETCREDENTIALS_ONLY        = 00000002h
LOGON_ZERO_PASSWORD_BUFFER       = 80000000h
HW_PROFILE_GUIDLEN               = 39
MAX_PROFILE_LEN                  = 80
DOCKINFO_UNDOCKED                = 1
DOCKINFO_DOCKED                  = 2
DOCKINFO_USER_SUPPLIED           = 4
DOCKINFO_USER_UNDOCKED           = (DOCKINFO_USER_SUPPLIED or DOCKINFO_UNDOCKED)
DOCKINFO_USER_DOCKED             = (DOCKINFO_USER_SUPPLIED or DOCKINFO_DOCKED)
ACTCTX_FLAG_PROCESSOR_ARCHITECTURE_VALID = 00000001h
ACTCTX_FLAG_LANGID_VALID            = 00000002h
ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID = 00000004h
ACTCTX_FLAG_RESOURCE_NAME_VALID     = 00000008h
ACTCTX_FLAG_SET_PROCESS_DEFAULT     = 00000010h
ACTCTX_FLAG_APPLICATION_NAME_VALID  = 00000020h
ACTCTX_FLAG_SOURCE_IS_ASSEMBLYREF   = 00000040h
ACTCTX_FLAG_HMODULE_VALID           = 00000080h
DEACTIVATE_ACTCTX_FLAG_FORCE_EARLY_DEACTIVATION = 00000001h
FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX = 00000001h
FIND_ACTCTX_SECTION_KEY_RETURN_FLAGS = 00000002h
FIND_ACTCTX_SECTION_KEY_RETURN_ASSEMBLY_METADATA = 00000004h
ACTIVATION_CONTEXT_BASIC_INFORMATION_DEFINED = 1
QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX = 00000004h
QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE = 00000008h
QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS = 00000010h
QUERY_ACTCTX_FLAG_NO_ADDREF         = 80000000h
COPY_FILE_COPY_SYMLINK           = 00000800h
PIPE_ACCEPT_REMOTE_CLIENTS       = 00000000h
PIPE_REJECT_REMOTE_CLIENTS       = 00000008h
NUMA_NO_PREFERRED_NODE           = -1
INHERIT_CALLER_PRIORITY          = 00020000h
CREATE_PROTECTED_PROCESS         = 00040000h
EXTENDED_STARTUPINFO_PRESENT     = 00080000h
PROCESS_MODE_BACKGROUND_BEGIN    = 00100000h
PROCESS_MODE_BACKGROUND_END      = 00200000h
THREAD_MODE_BACKGROUND_BEGIN     = 00010000h
THREAD_MODE_BACKGROUND_END       = 00020000h
VOLUME_NAME_DOS                  = 0h
VOLUME_NAME_GUID                 = 1h
VOLUME_NAME_NT                   = 2h
VOLUME_NAME_NONE                 = 4h
FILE_NAME_NORMALIZED             = 0h
FILE_NAME_OPENED                 = 8h
GetFreeSpace                     = 100000h
BACKUP_TXFS_DATA                 = 0000000ah
CREATE_MUTEX_INITIAL_OWNER       = 00000001h
CREATE_EVENT_MANUAL_RESET        = 00000001h
CREATE_EVENT_INITIAL_SET         = 00000002h
CREATE_WAITABLE_TIMER_MANUAL_RESET = 00000001h
LOAD_LIBRARY_AS_IMAGE_RESOURCE   = 00000020h
LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE = 00000040h
PROCESS_NAME_NATIVE              = 00000001h
PROC_THREAD_ATTRIBUTE_NUMBER     = 0000FFFFh
PROC_THREAD_ATTRIBUTE_THREAD     = 00010000h
PROC_THREAD_ATTRIBUTE_INPUT      = 00020000h
PROC_THREAD_ATTRIBUTE_ADDITIVE   = 00040000h
PROC_THREAD_ATTRIBUTE_REPLACE_VALUE = 00000001h
RESOURCE_ENUM_LN                 = 0001h
RESOURCE_ENUM_MUI                = 0002h
RESOURCE_ENUM_MUI_SYSTEM         = 0004h
RESOURCE_UPDATE_LN               = 0010h
RESOURCE_UPDATE_MUI              = 0020h
RESTART_MAX_CMD_LINE             = 2048
RESTART_NO_CRASH                 = 1
RESTART_NO_HANG                  = 2
RESTART_NO_PATCH                 = 4
RESTART_NO_REBOOT                = 8
RECOVERY_DEFAULT_PING_INTERVAL   = 5000
SYMBOLIC_LINK_FLAG_DIRECTORY     = 1h

;;;; end winbase

;;;; equates

TRUE                                 = 1
FALSE                                = 0
NULL                                 = 0
Normal                               = 000000h
ReadOnly                             = 000001h
Hidden                               = 000010h
System                               = 000100h
vLabel                               = 001000h
SubDir                               = 010000h
Archive                              = 100000h
Black                                = 000000h
Blue                                 = 0FF0000h
Green                                = 00FF00h
Cyan                                 = 0FFFF00h
Red                                  = 0000FFh
Magenta                              = 0FF00FFh
Yellow                               = 00FFFFh
White                                = 0FFFFFFh
Gray                                 = 080808h
MAXIMUM_SUPPORTED_EXTENSION          = 512
ANYSIZE_ARRAY                        = 1
INVALID_HANDLE_VALUE                 = -1
DELETE                               = 10000h
READ_CONTROL                         = 20000h
WRITE_DAC                            = 40000h
WRITE_OWNER                          = 80000h
SYNCHRONIZE                          = 100000h
STANDARD_RIGHTS_READ                 = READ_CONTROL
STANDARD_RIGHTS_WRITE                = READ_CONTROL
STANDARD_RIGHTS_EXECUTE              = READ_CONTROL
STANDARD_RIGHTS_REQUIRED             = 0F0000h
STANDARD_RIGHTS_ALL                  = 1F0000h
SPECIFIC_RIGHTS_ALL                  = 0FFFFh
SID_REVISION                         = 1
SID_MAX_SUB_AUTHORITIES              = 15
SID_RECOMMENDED_SUB_AUTHORITIES      = 1
SidTypeUser                          = 1
SidTypeGroup                         = 2
SidTypeDomain                        = 3
SidTypeAlias                         = 4
SidTypeWellKnownGroup                = 5
SidTypeDeletedAccount                = 6
SidTypeInvalid                       = 7
SidTypeUnknown                       = 8
SECURITY_NULL_RID                    = 0h
SECURITY_WORLD_RID                   = 0h
SECURITY_LOCAL_RID                   = 0h
SECURITY_CREATOR_OWNER_RID           = 0h
SECURITY_CREATOR_GROUP_RID           = 1h
SECURITY_DIALUP_RID                  = 1h
SECURITY_NETWORK_RID                 = 2h
SECURITY_BATCH_RID                   = 3h
SECURITY_INTERACTIVE_RID             = 4h
SECURITY_SERVICE_RID                 = 6h
SECURITY_ANONYMOUS_LOGON_RID         = 7h
SECURITY_LOGON_IDS_RID               = 5h
SECURITY_LOCAL_SYSTEM_RID            = 12h
SECURITY_NT_NON_UNIQUE               = 15h
SECURITY_BUILTIN_DOMAIN_RID          = 20h
DOMAIN_USER_RID_ADMIN                = 1F4h
DOMAIN_USER_RID_GUEST                = 1F5h
DOMAIN_GROUP_RID_ADMINS              = 200h
DOMAIN_GROUP_RID_USERS               = 201h
DOMAIN_GROUP_RID_GUESTS              = 202h
DOMAIN_ALIAS_RID_ADMINS              = 220h
DOMAIN_ALIAS_RID_USERS               = 221h
DOMAIN_ALIAS_RID_GUESTS              = 222h
DOMAIN_ALIAS_RID_POWER_USERS         = 223h
DOMAIN_ALIAS_RID_ACCOUNT_OPS         = 224h
DOMAIN_ALIAS_RID_SYSTEM_OPS          = 225h
DOMAIN_ALIAS_RID_PRINT_OPS           = 226h
DOMAIN_ALIAS_RID_BACKUP_OPS          = 227h
DOMAIN_ALIAS_RID_REPLICATOR          = 228h
SE_GROUP_MANDATORY                   = 1h
SE_GROUP_ENABLED_BY_DEFAULT          = 2h
SE_GROUP_ENABLED                     = 4h
SE_GROUP_OWNER                       = 8h
SE_GROUP_LOGON_ID                    = 0C0000000h
FILE_BEGIN                           = 0
FILE_CURRENT                         = 1
FILE_END                             = 2
FILE_FLAG_WRITE_THROUGH              = 80000000h
FILE_FLAG_OVERLAPPED                 = 40000000h
FILE_FLAG_NO_BUFFERING               = 20000000h
FILE_FLAG_RANDOM_ACCESS              = 10000000h
FILE_FLAG_SEQUENTIAL_SCAN            = 8000000h
FILE_FLAG_DELETE_ON_CLOSE            = 4000000h
FILE_FLAG_BACKUP_SEMANTICS           = 2000000h
FILE_FLAG_POSIX_SEMANTICS            = 1000000h
CREATE_NEW                           = 1
CREATE_ALWAYS                        = 2
OPEN_EXISTING                        = 3
OPEN_ALWAYS                          = 4
TRUNCATE_EXISTING                    = 5
PIPE_ACCESS_INBOUND                  = 1h
PIPE_ACCESS_OUTBOUND                 = 2h
PIPE_ACCESS_DUPLEX                   = 3h
PIPE_CLIENT_END                      = 0h
PIPE_SERVER_END                      = 1h
PIPE_WAIT                            = 0h
PIPE_NOWAIT                          = 1h
PIPE_READMODE_BYTE                   = 0h
PIPE_READMODE_MESSAGE                = 2h
PIPE_TYPE_BYTE                       = 0h
PIPE_TYPE_MESSAGE                    = 4h
PIPE_UNLIMITED_INSTANCES             = 255
SECURITY_CONTEXT_TRACKING            = 40000h
SECURITY_EFFECTIVE_ONLY              = 80000h
SECURITY_SQOS_PRESENT                = 100000h
SECURITY_VALID_SQOS_FLAGS            = 1F0000h
SP_SERIALCOMM                        = 1h
PST_UNSPECIFIED                      = 0h
PST_RS232                            = 1h
PST_PARALLELPORT                     = 2h
PST_RS422                            = 3h
PST_RS423                            = 4h
PST_RS449                            = 5h
PST_FAX                              = 21h
PST_SCANNER                          = 22h
PST_NETWORK_BRIDGE                   = 100h
PST_LAT                              = 101h
PST_TCPIP_TELNET                     = 102h
PST_X25                              = 103h
PCF_DTRDSR                           = 1h
PCF_RTSCTS                           = 2h
PCF_RLSD                             = 4h
PCF_PARITY_CHECK                     = 8h
PCF_XONXOFF                          = 10h
PCF_SETXCHAR                         = 20h
PCF_TOTALTIMEOUTS                    = 40h
PCF_INTTIMEOUTS                      = 80h
PCF_SPECIALCHARS                     = 100h
PCF_16BITMODE                        = 200h
DLL_PROCESS_DETACH                   = 0
DLL_PROCESS_ATTACH                   = 1
DLL_THREAD_ATTACH                    = 2
DLL_THREAD_DETACH                    = 3
SP_PARITY                            = 1h
SP_BAUD                              = 2h
SP_DATABITS                          = 4h
SP_STOPBITS                          = 8h
SP_HANDSHAKING                       = 10h
SP_PARITY_CHECK                      = 20h
SP_RLSD                              = 40h
BAUD_075                             = 1h
BAUD_110                             = 2h
BAUD_134_5                           = 4h
BAUD_150                             = 8h
BAUD_300                             = 10h
BAUD_600                             = 20h
BAUD_1200                            = 40h
BAUD_1800                            = 80h
BAUD_2400                            = 100h
BAUD_4800                            = 200h
BAUD_7200                            = 400h
BAUD_9600                            = 800h
BAUD_14400                           = 1000h
BAUD_19200                           = 2000h
BAUD_38400                           = 4000h
BAUD_56K                             = 8000h
BAUD_128K                            = 10000h
BAUD_115200                          = 20000h
BAUD_57600                           = 40000h
BAUD_USER                            = 10000000h
DATABITS_5                           = 1h
DATABITS_6                           = 2h
DATABITS_7                           = 4h
DATABITS_8                           = 8h
DATABITS_16                          = 10h
DATABITS_16X                         = 20h
STOPBITS_10                          = 1h
STOPBITS_15                          = 2h
STOPBITS_20                          = 4h
PARITY_NONE                          = 100h
PARITY_ODD                           = 200h
PARITY_EVEN                          = 400h
PARITY_MARK                          = 800h
PARITY_SPACE                         = 1000h
DTR_CONTROL_DISABLE                  = 0h
DTR_CONTROL_ENABLE                   = 1h
DTR_CONTROL_HANDSHAKE                = 2h
RTS_CONTROL_DISABLE                  = 0h
RTS_CONTROL_ENABLE                   = 1h
RTS_CONTROL_HANDSHAKE                = 2h
RTS_CONTROL_TOGGLE                   = 3h
GMEM_FIXED                           = 0h
GMEM_MOVEABLE                        = 2h
GMEM_NOCOMPACT                       = 10h
GMEM_NODISCARD                       = 20h
GMEM_ZEROINIT                        = 40h
GMEM_MODIFY                          = 80h
GMEM_DISCARDABLE                     = 100h
GMEM_NOT_BANKED                      = 1000h
GMEM_SHARE                           = 2000h
GMEM_DDESHARE                        = 2000h
GMEM_NOTIFY                          = 4000h
GMEM_LOWER                           = GMEM_NOT_BANKED
GMEM_VALID_FLAGS                     = 7F72h
GMEM_INVALID_HANDLE                  = 8000h
GMEM_DISCARDED                       = 4000h
GMEM_LOCKCOUNT                       = 0FFh
GHND                                 = GMEM_MOVEABLE or GMEM_ZEROINIT
GPTR                                 = GMEM_FIXED or GMEM_ZEROINIT
LMEM_FIXED                           = 0h
LMEM_MOVEABLE                        = 2h
LMEM_NOCOMPACT                       = 10h
LMEM_NODISCARD                       = 20h
LMEM_ZEROINIT                        = 40h
LMEM_MODIFY                          = 80h
LMEM_DISCARDABLE                     = 0F00h
LMEM_VALID_FLAGS                     = 0F72h
LMEM_INVALID_HANDLE                  = 8000h
LHND                                 = LMEM_MOVEABLE + LMEM_ZEROINIT
LPTR                                 = LMEM_FIXED + LMEM_ZEROINIT
NONZEROLHND                          = LMEM_MOVEABLE
NONZEROLPTR                          = LMEM_FIXED
LMEM_DISCARDED                       = 4000h
LMEM_LOCKCOUNT                       = 0FFh
DEBUG_PROCESS                        = 1h
DEBUG_ONLY_THIS_PROCESS              = 2h
CREATE_SUSPENDED                     = 4h
CREATE_SEPARATE_WOW_VDM              = 800h
DETACHED_PROCESS                     = 8h
CREATE_NEW_CONSOLE                   = 10h
NORMAL_PRIORITY_CLASS                = 20h
IDLE_PRIORITY_CLASS                  = 40h
HIGH_PRIORITY_CLASS                  = 80h
REALTIME_PRIORITY_CLASS              = 100h
CREATE_NEW_PROCESS_GROUP             = 200h
CREATE_NO_WINDOW                     = 8000000h
PROFILE_USER                         = 10000000h
PROFILE_KERNEL                       = 20000000h
PROFILE_SERVER                       = 40000000h
MAXLONG                              = 7FFFFFFFh
THREAD_BASE_PRIORITY_MIN             = -2
THREAD_BASE_PRIORITY_MAX             = 2
THREAD_BASE_PRIORITY_LOWRT           = 15
THREAD_BASE_PRIORITY_IDLE            = -15
THREAD_PRIORITY_LOWEST               = THREAD_BASE_PRIORITY_MIN
THREAD_PRIORITY_BELOW_NORMAL         = THREAD_PRIORITY_LOWEST + 1
THREAD_PRIORITY_NORMAL               = 0
THREAD_PRIORITY_HIGHEST              = THREAD_BASE_PRIORITY_MAX
THREAD_PRIORITY_ABOVE_NORMAL         = THREAD_PRIORITY_HIGHEST - 1
THREAD_PRIORITY_ERROR_RETURN         = MAXLONG
THREAD_PRIORITY_TIME_CRITICAL        = THREAD_BASE_PRIORITY_LOWRT
THREAD_PRIORITY_IDLE                 = THREAD_BASE_PRIORITY_IDLE
APPLICATION_ERROR_MASK               = 20000000h
ERROR_SEVERITY_SUCCESS               = 0h
ERROR_SEVERITY_INFORMATIONAL         = 40000000h
ERROR_SEVERITY_WARNING               = 80000000h
ERROR_SEVERITY_ERROR                 = 0C0000000h
MINCHAR                              = 80h
MAXCHAR                              = 7Fh
MINSHORT                             = 8000h
MAXSHORT                             = 7FFFh
MINLONG                              = 80000000h
MAXBYTE                              = 0FFh
MAXWORD                              = 0FFFFh
MAXDWORD                             = 0FFFFFFFFh
LANG_NEUTRAL                         = 0h
LANG_BULGARIAN                       = 2h
LANG_CHINESE                         = 4h
LANG_CROATIAN                        = 1Ah
LANG_CZECH                           = 5h
LANG_DANISH                          = 6h
LANG_DUTCH                           = 13h
LANG_ENGLISH                         = 9h
LANG_FINNISH                         = 0Bh
LANG_FRENCH                          = 0Ch
LANG_GERMAN                          = 7h
LANG_GREEK                           = 8h
LANG_HUNGARIAN                       = 0Eh
LANG_ICELANDIC                       = 0Fh
LANG_ITALIAN                         = 10h
LANG_JAPANESE                        = 11h
LANG_KOREAN                          = 12h
LANG_NORWEGIAN                       = 14h
LANG_POLISH                          = 15h
LANG_PORTUGUESE                      = 16h
LANG_ROMANIAN                        = 18h
LANG_RUSSIAN                         = 19h
LANG_SLOVAK                          = 1Bh
LANG_SLOVENIAN                       = 24h
LANG_SPANISH                         = 0Ah
LANG_SWEDISH                         = 1Dh
LANG_TURKISH                         = 1Fh
SUBLANG_NEUTRAL                      = 0h
SUBLANG_DEFAULT                      = 1h
SUBLANG_SYS_DEFAULT                  = 2h
SUBLANG_CHINESE_TRADITIONAL          = 1h
SUBLANG_CHINESE_SIMPLIFIED           = 2h
SUBLANG_CHINESE_HONGKONG             = 3h
SUBLANG_CHINESE_SINGAPORE            = 4h
SUBLANG_DUTCH                        = 1h
SUBLANG_DUTCH_BELGIAN                = 2h
SUBLANG_ENGLISH_US                   = 1h
SUBLANG_ENGLISH_UK                   = 2h
SUBLANG_ENGLISH_AUS                  = 3h
SUBLANG_ENGLISH_CAN                  = 4h
SUBLANG_ENGLISH_NZ                   = 5h
SUBLANG_ENGLISH_EIRE                 = 6h
SUBLANG_FRENCH                       = 1h
SUBLANG_FRENCH_BELGIAN               = 2h
SUBLANG_FRENCH_CANADIAN              = 3h
SUBLANG_FRENCH_SWISS                 = 4h
SUBLANG_GERMAN                       = 1h
SUBLANG_GERMAN_SWISS                 = 2h
SUBLANG_GERMAN_AUSTRIAN              = 3h
SUBLANG_ITALIAN                      = 1h
SUBLANG_ITALIAN_SWISS                = 2h
SUBLANG_NORWEGIAN_BOKMAL             = 1h
SUBLANG_NORWEGIAN_NYNORSK            = 2h
SUBLANG_PORTUGUESE                   = 2h
SUBLANG_PORTUGUESE_BRAZILIAN         = 1h
SUBLANG_SPANISH                      = 1h
SUBLANG_SPANISH_MEXICAN              = 2h
SUBLANG_SPANISH_MODERN               = 3h
SORT_DEFAULT                         = 0h
SORT_JAPANESE_XJIS                   = 0h
SORT_JAPANESE_UNICODE                = 1h
SORT_CHINESE_BIG5                    = 0h
SORT_CHINESE_UNICODE                 = 1h
SORT_KOREAN_KSC                      = 0h
SORT_KOREAN_UNICODE                  = 1h
FILE_READ_DATA                       = 1h
FILE_LIST_DIRECTORY                  = 1h
FILE_WRITE_DATA                      = 2h
FILE_ADD_FILE                        = 2h
FILE_APPEND_DATA                     = 4h
FILE_ADD_SUBDIRECTORY                = 4h
FILE_CREATE_PIPE_INSTANCE            = 4h
FILE_READ_EA                         = 8h
FILE_READ_PROPERTIES                 = FILE_READ_EA
FILE_WRITE_EA                        = 10h
FILE_WRITE_PROPERTIES                = FILE_WRITE_EA
FILE_EXECUTE                         = 20h
FILE_TRAVERSE                        = 20h
FILE_DELETE_CHILD                    = 40h
FILE_READ_ATTRIBUTES                 = 80h
FILE_WRITE_ATTRIBUTES                = 100h
FILE_ALL_ACCESS                      = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or 1FFh
FILE_SHARE_READ                      = 1h
FILE_SHARE_WRITE                     = 2h
FILE_ATTRIBUTE_READONLY              = 1h
FILE_ATTRIBUTE_HIDDEN                = 2h
FILE_ATTRIBUTE_SYSTEM                = 4h
FILE_ATTRIBUTE_DIRECTORY             = 10h
FILE_ATTRIBUTE_ARCHIVE               = 20h
FILE_ATTRIBUTE_NORMAL                = 80h
FILE_ATTRIBUTE_TEMPORARY             = 100h
FILE_ATTRIBUTE_COMPRESSED            = 800h
FILE_NOTIFY_CHANGE_FILE_NAME         = 1h
FILE_NOTIFY_CHANGE_DIR_NAME          = 2h
FILE_NOTIFY_CHANGE_ATTRIBUTES        = 4h
FILE_NOTIFY_CHANGE_SIZE              = 8h
FILE_NOTIFY_CHANGE_LAST_WRITE        = 10h
FILE_NOTIFY_CHANGE_SECURITY          = 100h
MAILSLOT_NO_MESSAGE                  = -1
MAILSLOT_WAIT_FOREVER                = -1
FILE_CASE_SENSITIVE_SEARCH           = 1h
FILE_CASE_PRESERVED_NAMES            = 2h
FILE_UNICODE_ON_DISK                 = 4h
FILE_PERSISTENT_ACLS                 = 8h
FILE_FILE_COMPRESSION                = 10h
FILE_VOLUME_IS_COMPRESSED            = 8000h
IO_COMPLETION_MODIFY_STATE           = 2h
IO_COMPLETION_ALL_ACCESS             = STANDARD_RIGHTS_REQUIRED or SYNCHRONIZE or 3h
DUPLICATE_CLOSE_SOURCE               = 1h
DUPLICATE_SAME_ACCESS                = 2h
ACCESS_SYSTEM_SECURITY               = 1000000h
MAXIMUM_ALLOWED                      = 2000000h
GENERIC_READ                         = 80000000h
GENERIC_WRITE                        = 40000000h
GENERIC_EXECUTE                      = 20000000h
GENERIC_ALL                          = 10000000h
ACL_REVISION                         = 2
ACL_REVISION1                        = 1
ACL_REVISION2                        = 2
ACCESS_ALLOWED_ACE_TYPE              = 0h
ACCESS_DENIED_ACE_TYPE               = 1h
SYSTEM_AUDIT_ACE_TYPE                = 2h
SYSTEM_ALARM_ACE_TYPE                = 3h
HELPINFO_WINDOW                      = 1
HELPINFO_MENUITEM                    = 2
OBJECT_INHERIT_ACE                   = 1h
CONTAINER_INHERIT_ACE                = 2h
NO_PROPAGATE_INHERIT_ACE             = 4h
INHERIT_ONLY_ACE                     = 8h
VALID_INHERIT_FLAGS                  = 0Fh
SUCCESSFUL_ACCESS_ACE_FLAG           = 40h
FAILED_ACCESS_ACE_FLAG               = 80h
AclRevisionInformation               = 1
AclSizeInformation                   = 2
SECURITY_DESCRIPTOR_REVISION         = 1
SECURITY_DESCRIPTOR_REVISION1        = 1
SECURITY_DESCRIPTOR_MIN_LENGTH       = 20
SE_OWNER_DEFAULTED                   = 1h
SE_GROUP_DEFAULTED                   = 2h
SE_DACL_PRESENT                      = 4h
SE_DACL_DEFAULTED                    = 8h
SE_SACL_PRESENT                      = 10h
SE_SACL_DEFAULTED                    = 20h
SE_SELF_RELATIVE                     = 8000h
SE_PRIVILEGE_ENABLED_BY_DEFAULT      = 1h
SE_PRIVILEGE_ENABLED                 = 2h
SE_PRIVILEGE_USED_FOR_ACCESS         = 80000000h
PRIVILEGE_SET_ALL_NECESSARY          = 1
SecurityAnonymous                    = 1
SecurityIdentification               = 2
REG_OPTION_RESERVED                  = 0
REG_OPTION_NON_VOLATILE              = 0
REG_OPTION_VOLATILE                  = 1
REG_OPTION_CREATE_LINK               = 2
REG_OPTION_BACKUP_RESTORE            = 4
REG_NONE                             = 0
REG_SZ                               = 1
REG_EXPAND_SZ                        = 2
REG_BINARY                           = 3
REG_DWORD                            = 4
REG_DWORD_LITTLE_ENDIAN              = 4
REG_DWORD_BIG_ENDIAN                 = 5
REG_LINK                             = 6
REG_MULTI_SZ                         = 7
REG_RESOURCE_LIST                    = 8
REG_FULL_RESOURCE_DESCRIPTOR         = 9
REG_RESOURCE_REQUIREMENTS_LIST       = 10
REG_CREATED_NEW_KEY                  = 1h
REG_OPENED_EXISTING_KEY              = 2h
REG_WHOLE_HIVE_VOLATILE              = 1h
REG_REFRESH_HIVE                     = 2h
REG_NOTIFY_CHANGE_NAME               = 1h
REG_NOTIFY_CHANGE_ATTRIBUTES         = 2h
REG_NOTIFY_CHANGE_LAST_SET           = 4h
REG_NOTIFY_CHANGE_SECURITY           = 8h
REG_LEGAL_CHANGE_FILTER              = REG_NOTIFY_CHANGE_NAME or REG_NOTIFY_CHANGE_ATTRIBUTES or REG_NOTIFY_CHANGE_LAST_SET or REG_NOTIFY_CHANGE_SECURITY
REG_LEGAL_OPTION                     = REG_OPTION_RESERVED or REG_OPTION_NON_VOLATILE or REG_OPTION_VOLATILE or REG_OPTION_CREATE_LINK or REG_OPTION_BACKUP_RESTORE
KEY_QUERY_VALUE                      = 1h
KEY_SET_VALUE                        = 2h
KEY_CREATE_SUB_KEY                   = 4h
KEY_ENUMERATE_SUB_KEYS               = 8h
KEY_NOTIFY                           = 10h
KEY_CREATE_LINK                      = 20h
KEY_READ                             = (STANDARD_RIGHTS_READ or KEY_QUERY_VALUE or KEY_ENUMERATE_SUB_KEYS or KEY_NOTIFY) and not SYNCHRONIZE
KEY_WRITE                            = (STANDARD_RIGHTS_WRITE or KEY_SET_VALUE or KEY_CREATE_SUB_KEY) and not SYNCHRONIZE
KEY_EXECUTE                          = KEY_READ
KEY_ALL_ACCESS                       = (STANDARD_RIGHTS_ALL or KEY_QUERY_VALUE or KEY_SET_VALUE or KEY_CREATE_SUB_KEY or KEY_ENUMERATE_SUB_KEYS or KEY_NOTIFY or KEY_CREATE_LINK) and not SYNCHRONIZE
EXCEPTION_DEBUG_EVENT                = 1
CREATE_THREAD_DEBUG_EVENT            = 2
CREATE_PROCESS_DEBUG_EVENT           = 3
EXIT_THREAD_DEBUG_EVENT              = 4
EXIT_PROCESS_DEBUG_EVENT             = 5
LOAD_DLL_DEBUG_EVENT                 = 6
UNLOAD_DLL_DEBUG_EVENT               = 7
OUTPUT_DEBUG_STRING_EVENT            = 8
RIP_EVENT                            = 9
EXCEPTION_MAXIMUM_PARAMETERS         = 15
DRIVE_REMOVABLE                      = 2
DRIVE_FIXED                          = 3
DRIVE_REMOTE                         = 4
DRIVE_CDROM                          = 5
DRIVE_RAMDISK                        = 6
FILE_TYPE_UNKNOWN                    = 0h
FILE_TYPE_DISK                       = 1h
FILE_TYPE_CHAR                       = 2h
FILE_TYPE_PIPE                       = 3h
FILE_TYPE_REMOTE                     = 8000h
STD_INPUT_HANDLE                     = -10
STD_OUTPUT_HANDLE                    = -11
STD_ERROR_HANDLE                     = -12
NOPARITY                             = 0
ODDPARITY                            = 1
EVENPARITY                           = 2
MARKPARITY                           = 3
SPACEPARITY                          = 4
ONESTOPBIT                           = 0
ONE5STOPBITS                         = 1
TWOSTOPBITS                          = 2
IGNORE                               = 0
INFINITE                             = -1
CBR_110                              = 110
CBR_300                              = 300
CBR_600                              = 600
CBR_1200                             = 1200
CBR_2400                             = 2400
CBR_4800                             = 4800
CBR_9600                             = 9600
CBR_14400                            = 14400
CBR_19200                            = 19200
CBR_38400                            = 38400
CBR_56000                            = 56000
CBR_57600                            = 57600
CBR_115200                           = 115200
CBR_128000                           = 128000
CBR_256000                           = 256000
CE_RXOVER                            = 1h
CE_OVERRUN                           = 2h
CE_RXPARITY                          = 4h
CE_FRAME                             = 8h
CE_BREAK                             = 10h
CE_TXFULL                            = 100h
CE_PTO                               = 200h
CE_IOE                               = 400h
CE_DNS                               = 800h
CE_OOP                               = 1000h
CE_MODE                              = 8000h
IE_BADID                             = -1
IE_OPEN                              = -2
IE_NOPEN                             = -3
IE_MEMORY                            = -4
IE_DEFAULT                           = -5
IE_HARDWARE                          = -10
IE_BYTESIZE                          = -11
IE_BAUDRATE                          = -12
EV_RXCHAR                            = 1h
EV_RXFLAG                            = 2h
EV_TXEMPTY                           = 4h
EV_CTS                               = 8h
EV_DSR                               = 10h
EV_RLSD                              = 20h
EV_BREAK                             = 40h
EV_ERR                               = 80h
EV_RING                              = 100h
EV_PERR                              = 200h
EV_RX80FULL                          = 400h
EV_EVENT1                            = 800h
EV_EVENT2                            = 1000h
SETXOFF                              = 1
SETXON                               = 2
SETRTS                               = 3
CLRRTS                               = 4
SETDTR                               = 5
CLRDTR                               = 6
RESETDEV                             = 7
SETBREAK                             = 8
CLRBREAK                             = 9
PURGE_TXABORT                        = 1h
PURGE_RXABORT                        = 2h
PURGE_TXCLEAR                        = 4h
PURGE_RXCLEAR                        = 8h
LPTx                                 = 80h
MS_CTS_ON                            = 10h
MS_DSR_ON                            = 20h
MS_RING_ON                           = 40h
MS_RLSD_ON                           = 80h
S_QUEUEEMPTY                         = 0
S_THRESHOLD                          = 1
S_ALLTHRESHOLD                       = 2
S_NORMAL                             = 0
S_LEGATO                             = 1
S_STACCATO                           = 2
S_PERIOD512                          = 0
S_PERIOD1024                         = 1
S_PERIOD2048                         = 2
S_PERIODVOICE                        = 3
S_WHITE512                           = 4
S_WHITE1024                          = 5
S_WHITE2048                          = 6
S_WHITEVOICE                         = 7
S_SERDVNA                            = -1
S_SEROFM                             = -2
S_SERMACT                            = -3
S_SERQFUL                            = -4
S_SERBDNT                            = -5
S_SERDLN                             = -6
S_SERDCC                             = -7
S_SERDTP                             = -8
S_SERDVL                             = -9
S_SERDMD                             = -10
S_SERDSH                             = -11
S_SERDPT                             = -12
S_SERDFQ                             = -13
S_SERDDR                             = -14
S_SERDSR                             = -15
S_SERDST                             = -16
NMPWAIT_WAIT_FOREVER                 = 0FFFFh
NMPWAIT_NOWAIT                       = 1h
NMPWAIT_USE_DEFAULT_WAIT             = 0h
FS_CASE_IS_PRESERVED                 = FILE_CASE_PRESERVED_NAMES
FS_CASE_SENSITIVE                    = FILE_CASE_SENSITIVE_SEARCH
FS_UNICODE_STORED_ON_DISK            = FILE_UNICODE_ON_DISK
FS_PERSISTENT_ACLS                   = FILE_PERSISTENT_ACLS
SECTION_QUERY                        = 1h
SECTION_MAP_WRITE                    = 2h
SECTION_MAP_READ                     = 4h
SECTION_MAP_EXECUTE                  = 8h
SECTION_EXTEND_SIZE                  = 10h
FILE_MAP_COPY                        = SECTION_QUERY
FILE_MAP_WRITE                       = SECTION_MAP_WRITE
FILE_MAP_READ                        = SECTION_MAP_READ
FILE_MAP_ALL_ACCESS                  = SECTION_ALL_ACCESS
OF_READ                              = 0h
OF_WRITE                             = 1h
OF_READWRITE                         = 2h
OF_SHARE_COMPAT                      = 0h
OF_SHARE_EXCLUSIVE                   = 10h
OF_SHARE_DENY_WRITE                  = 20h
OF_SHARE_DENY_READ                   = 30h
OF_SHARE_DENY_NONE                   = 40h
OF_PARSE                             = 100h
OF_DELETE                            = 200h
OF_VERIFY                            = 400h
OF_CANCEL                            = 800h
OF_CREATE                            = 1000h
OF_PROMPT                            = 2000h
OF_EXIST                             = 4000h
OF_REOPEN                            = 8000h
OFS_MAXPATHNAME                      = 128
DONT_RESOLVE_DLL_REFERENCES          = 1h
TC_NORMAL                            = 0
TC_HARDERR                           = 1
TC_GP_TRAP                           = 2
TC_SIGNAL                            = 3
MAX_LEADBYTES                        = 12
MB_PRECOMPOSED                       = 1h
MB_COMPOSITE                         = 2h
MB_USEGLYPHCHARS                     = 4h
WC_DEFAULTCHECK                      = 100h
WC_COMPOSITECHECK                    = 200h
WC_DISCARDNS                         = 10h
WC_SEPCHARS                          = 20h
WC_DEFAULTCHAR                       = 40h
CT_CTYPE1                            = 1h
CT_CTYPE2                            = 2h
CT_CTYPE3                            = 4h
C1_UPPER                             = 1h
C1_LOWER                             = 2h
C1_DIGIT                             = 4h
C1_SPACE                             = 8h
C1_PUNCT                             = 10h
C1_CNTRL                             = 20h
C1_BLANK                             = 40h
C1_XDIGIT                            = 80h
C1_ALPHA                             = 100h
C2_LEFTTORIGHT                       = 1h
C2_RIGHTTOLEFT                       = 2h
C2_EUROPENUMBER                      = 3h
C2_EUROPESEPARATOR                   = 4h
C2_EUROPETERMINATOR                  = 5h
C2_ARABICNUMBER                      = 6h
C2_COMMONSEPARATOR                   = 7h
C2_BLOCKSEPARATOR                    = 8h
C2_SEGMENTSEPARATOR                  = 9h
C2_WHITESPACE                        = 0Ah
C2_OTHERNEUTRAL                      = 0Bh
C2_NOTAPPLICABLE                     = 0h
C3_NONSPACING                        = 1h
C3_DIACRITIC                         = 2h
C3_VOWELMARK                         = 4h
C3_SYMBOL                            = 8h
C3_NOTAPPLICABLE                     = 0h
NORM_IGNORECASE                      = 1h
NORM_IGNORENONSPACE                  = 2h
NORM_IGNORESYMBOLS                   = 4h
MAP_FOLDCZONE                        = 10h
MAP_PRECOMPOSED                      = 20h
MAP_COMPOSITE                        = 40h
MAP_FOLDDIGITS                       = 80h
LCMAP_LOWERCASE                      = 100h
LCMAP_UPPERCASE                      = 200h
LCMAP_SORTKEY                        = 400h
LCMAP_BYTEREV                        = 800h
SORT_STRINGSORT                      = 1000h
CP_ACP                               = 0
CP_OEMCP                             = 1
CP_UTF8                              = 65001
CTRY_DEFAULT                         = 0
CTRY_AUSTRALIA                       = 61
CTRY_AUSTRIA                         = 43
CTRY_BELGIUM                         = 32
CTRY_BRAZIL                          = 55
CTRY_CANADA                          = 2
CTRY_DENMARK                         = 45
CTRY_FINLAND                         = 358
CTRY_FRANCE                          = 33
CTRY_GERMANY                         = 49
CTRY_ICELAND                         = 354
CTRY_IRELAND                         = 353
CTRY_ITALY                           = 39
CTRY_JAPAN                           = 81
CTRY_MEXICO                          = 52
CTRY_NETHERLANDS                     = 31
CTRY_NEW_ZEALAND                     = 64
CTRY_NORWAY                          = 47
CTRY_PORTUGAL                        = 351
CTRY_PRCHINA                         = 86
CTRY_SOUTH_KOREA                     = 82
CTRY_SPAIN                           = 34
CTRY_SWEDEN                          = 46
CTRY_SWITZERLAND                     = 41
CTRY_TAIWAN                          = 886
CTRY_UNITED_KINGDOM                  = 44
CTRY_UNITED_STATES                   = 1
LOCALE_NOUSEROVERRIDE                = 80000000h
LOCALE_USER_DEFAULT                  = 0400h
LOCALE_ILANGUAGE                     = 1h
LOCALE_SLANGUAGE                     = 2h
LOCALE_SENGLANGUAGE                  = 1001h
LOCALE_SABBREVLANGNAME               = 3h
LOCALE_SNATIVELANGNAME               = 4h
LOCALE_ICOUNTRY                      = 5h
LOCALE_SCOUNTRY                      = 6h
LOCALE_SENGCOUNTRY                   = 1002h
LOCALE_SABBREVCTRYNAME               = 7h
LOCALE_SNATIVECTRYNAME               = 8h
LOCALE_IDEFAULTLANGUAGE              = 9h
LOCALE_IDEFAULTCOUNTRY               = 0Ah
LOCALE_IDEFAULTCODEPAGE              = 0Bh
LOCALE_SLIST                         = 0Ch
LOCALE_IMEASURE                      = 0Dh
LOCALE_SDECIMAL                      = 0Eh
LOCALE_STHOUSAND                     = 0Fh
LOCALE_SGROUPING                     = 10h
LOCALE_IDIGITS                       = 11h
LOCALE_ILZERO                        = 12h
LOCALE_SNATIVEDIGITS                 = 13h
LOCALE_SCURRENCY                     = 14h
LOCALE_SINTLSYMBOL                   = 15h
LOCALE_SMONDECIMALSEP                = 16h
LOCALE_SMONTHOUSANDSEP               = 17h
LOCALE_SMONGROUPING                  = 18h
LOCALE_ICURRDIGITS                   = 19h
LOCALE_IINTLCURRDIGITS               = 1Ah
LOCALE_ICURRENCY                     = 1Bh
LOCALE_INEGCURR                      = 1Ch
LOCALE_SDATE                         = 1Dh
LOCALE_STIME                         = 1Eh
LOCALE_SSHORTDATE                    = 1Fh
LOCALE_SLONGDATE                     = 20h
LOCALE_STIMEFORMAT                   = 1003h
LOCALE_IDATE                         = 21h
LOCALE_ILDATE                        = 22h
LOCALE_ITIME                         = 23h
LOCALE_ICENTURY                      = 24h
LOCALE_ITLZERO                       = 25h
LOCALE_IDAYLZERO                     = 26h
LOCALE_IMONLZERO                     = 27h
LOCALE_S1159                         = 28h
LOCALE_S2359                         = 29h
LOCALE_SDAYNAME1                     = 2Ah
LOCALE_SDAYNAME2                     = 2Bh
LOCALE_SDAYNAME3                     = 2Ch
LOCALE_SDAYNAME4                     = 2Dh
LOCALE_SDAYNAME5                     = 2Eh
LOCALE_SDAYNAME6                     = 2Fh
LOCALE_SDAYNAME7                     = 30h
LOCALE_SABBREVDAYNAME1               = 31h
LOCALE_SABBREVDAYNAME2               = 32h
LOCALE_SABBREVDAYNAME3               = 33h
LOCALE_SABBREVDAYNAME4               = 34h
LOCALE_SABBREVDAYNAME5               = 35h
LOCALE_SABBREVDAYNAME6               = 36h
LOCALE_SABBREVDAYNAME7               = 37h
LOCALE_SMONTHNAME1                   = 38h
LOCALE_SMONTHNAME2                   = 39h
LOCALE_SMONTHNAME3                   = 3Ah
LOCALE_SMONTHNAME4                   = 3Bh
LOCALE_SMONTHNAME5                   = 3Ch
LOCALE_SMONTHNAME6                   = 3Dh
LOCALE_SMONTHNAME7                   = 3Eh
LOCALE_SMONTHNAME8                   = 3Fh
LOCALE_SMONTHNAME9                   = 40h
LOCALE_SMONTHNAME10                  = 41h
LOCALE_SMONTHNAME11                  = 42h
LOCALE_SMONTHNAME12                  = 43h
LOCALE_SABBREVMONTHNAME1             = 44h
LOCALE_SABBREVMONTHNAME2             = 45h
LOCALE_SABBREVMONTHNAME3             = 46h
LOCALE_SABBREVMONTHNAME4             = 47h
LOCALE_SABBREVMONTHNAME5             = 48h
LOCALE_SABBREVMONTHNAME6             = 49h
LOCALE_SABBREVMONTHNAME7             = 4Ah
LOCALE_SABBREVMONTHNAME8             = 4Bh
LOCALE_SABBREVMONTHNAME9             = 4Ch
LOCALE_SABBREVMONTHNAME10            = 4Dh
LOCALE_SABBREVMONTHNAME11            = 4Eh
LOCALE_SABBREVMONTHNAME12            = 4Fh
LOCALE_SABBREVMONTHNAME13            = 100Fh
LOCALE_SPOSITIVESIGN                 = 50h
LOCALE_SNEGATIVESIGN                 = 51h
LOCALE_IPOSSIGNPOSN                  = 52h
LOCALE_INEGSIGNPOSN                  = 53h
LOCALE_IPOSSYMPRECEDES               = 54h
LOCALE_IPOSSEPBYSPACE                = 55h
LOCALE_INEGSYMPRECEDES               = 56h
LOCALE_INEGSEPBYSPACE                = 57h
TIME_NOMINUTESORSECONDS              = 1h
TIME_NOSECONDS                       = 2h
TIME_NOTIMEMARKER                    = 4h
TIME_FORCE24HOURFORMAT               = 8h
DATE_SHORTDATE                       = 1h
DATE_LONGDATE                        = 2h
TF_FORCEDRIVE                        = 80h
LOCKFILE_FAIL_IMMEDIATELY            = 1h
LOCKFILE_EXCLUSIVE_LOCK              = 2h
LNOTIFY_OUTOFMEM                     = 0
LNOTIFY_MOVE                         = 1
LNOTIFY_DISCARD                      = 2
SLE_ERROR                            = 1h
SLE_MINORERROR                       = 2h
SLE_WARNING                          = 3h
SEM_FAILCRITICALERRORS               = 1h
SEM_NOGPFAULTERRORBOX                = 2h
SEM_NOOPENFILEERRORBOX               = 8000h
RT_CURSOR                            = 1
RT_BITMAP                            = 2
RT_ICON                              = 3
RT_MENU                              = 4
RT_DIALOG                            = 5
RT_STRING                            = 6
RT_FONTDIR                           = 7
RT_FONT                              = 8
RT_ACCELERATOR                       = 9
RT_RCDATA                            = 10
DFC_CAPTION                          = 1
DFC_MENU                             = 2
DFC_SCROLL                           = 3
DFC_BUTTON                           = 4
DFC_POPUPMENU                         = 5
DFCS_CAPTIONCLOSE                    = 0000h
DFCS_CAPTIONMIN                      = 0001h
DFCS_CAPTIONMAX                      = 0002h
DFCS_CAPTIONRESTORE                  = 0003h
DFCS_CAPTIONHELP                     = 0004h
DFCS_MENUARROW                       = 0000h
DFCS_MENUCHECK                       = 0001h
DFCS_MENUBULLET                      = 0002h
DFCS_MENUARROWRIGHT                  = 0004h
DFCS_SCROLLUP                        = 0000h
DFCS_SCROLLDOWN                      = 0001h
DFCS_SCROLLLEFT                      = 0002h
DFCS_SCROLLRIGHT                     = 0003h
DFCS_SCROLLCOMBOBOX                  = 0005h
DFCS_SCROLLSIZEGRIP                  = 0008h
DFCS_SCROLLSIZEGRIPRIGHT             = 0010h
DFCS_BUTTONCHECK                     = 0000h
DFCS_BUTTONRADIOIMAGE                = 0001h
DFCS_BUTTONRADIOMASK                 = 0002h
DFCS_BUTTONRADIO                     = 0004h
DFCS_BUTTON3STATE                    = 0008h
DFCS_BUTTONPUSH                      = 0010h
DFCS_INACTIVE                        = 0100h
DFCS_PUSHED                          = 0200h
DFCS_CHECKED                         = 0400h
DFCS_TRANSPARENT                      = 0800h
DFCS_HOT                              = 1000h
DFCS_ADJUSTRECT                      = 2000h
DFCS_FLAT                            = 4000h
DFCS_MONO                            = 8000h
DDD_RAW_TARGET_PATH                  = 1h
DDD_REMOVE_DEFINITION                = 2h
DDD_EXACT_MATCH_ON_REMOVE            = 4h
MAX_PATH                             = 260
MOVEFILE_REPLACE_EXISTING            = 1h
MOVEFILE_COPY_ALLOWED                = 2h
MOVEFILE_DELAY_UNTIL_REBOOT          = 4h
TokenUser                            = 1
TokenGroups                          = 2
TokenPrivileges                      = 3
TokenOwner                           = 4
TokenPrimaryGroup                    = 5
TokenDefaultDacl                     = 6
TokenSource                          = 7
TokenType                            = 8
TokenImpersonationLevel              = 9
TokenStatistics                      = 10
TOKEN_ADJUST_PRIVILEGES              = 20h
GET_TAPE_MEDIA_INFORMATION           = 0
GET_TAPE_DRIVE_INFORMATION           = 1
SET_TAPE_MEDIA_INFORMATION           = 0
SET_TAPE_DRIVE_INFORMATION           = 1
FORMAT_MESSAGE_ALLOCATE_BUFFER       = 100h
FORMAT_MESSAGE_IGNORE_INSERTS        = 200h
FORMAT_MESSAGE_FROM_STRING           = 400h
FORMAT_MESSAGE_FROM_HMODULE          = 800h
FORMAT_MESSAGE_FROM_SYSTEM           = 1000h
FORMAT_MESSAGE_ARGUMENT_ARRAY        = 2000h
FORMAT_MESSAGE_MAX_WIDTH_MASK        = 0FFh
TLS_OUT_OF_INDEXES                   = 0FFFFh
BACKUP_DATA                          = 1h
BACKUP_EA_DATA                       = 2h
BACKUP_SECURITY_DATA                 = 3h
BACKUP_ALTERNATE_DATA                = 4h
BACKUP_LINK                          = 5h
STREAM_MODIFIED_WHEN_READ            = 1h
STREAM_CONTAINS_SECURITY             = 2h
STARTF_USESHOWWINDOW                 = 1h
STARTF_USESIZE                       = 2h
STARTF_USEPOSITION                   = 4h
STARTF_USECOUNTCHARS                 = 8h
STARTF_USEFILLATTRIBUTE              = 10h
STARTF_RUNFULLSCREEN                 = 20h
STARTF_FORCEONFEEDBACK               = 40h
STARTF_FORCEOFFFEEDBACK              = 80h
STARTF_USESTDHANDLES                 = 100h
SHUTDOWN_NORETRY                     = 1h
MAX_DEFAULTCHAR                      = 2
CAL_ICALINTVALUE                     = 1h
CAL_SCALNAME                         = 2h
CAL_IYEAROFFSETRANGE                 = 3h
CAL_SERASTRING                       = 4h
CAL_SSHORTDATE                       = 5h
CAL_SLONGDATE                        = 6h
CAL_SDAYNAME1                        = 7h
CAL_SDAYNAME2                        = 8h
CAL_SDAYNAME3                        = 9h
CAL_SDAYNAME4                        = 0Ah
CAL_SDAYNAME5                        = 0Bh
CAL_SDAYNAME6                        = 0Ch
CAL_SDAYNAME7                        = 0Dh
CAL_SABBREVDAYNAME1                  = 0Eh
CAL_SABBREVDAYNAME2                  = 0Fh
CAL_SABBREVDAYNAME3                  = 10h
CAL_SABBREVDAYNAME4                  = 11h
CAL_SABBREVDAYNAME5                  = 12h
CAL_SABBREVDAYNAME6                  = 13h
CAL_SABBREVDAYNAME7                  = 14h
CAL_SMONTHNAME1                      = 15h
CAL_SMONTHNAME2                      = 16h
CAL_SMONTHNAME3                      = 17h
CAL_SMONTHNAME4                      = 18h
CAL_SMONTHNAME5                      = 19h
CAL_SMONTHNAME6                      = 1Ah
CAL_SMONTHNAME7                      = 1Bh
CAL_SMONTHNAME8                      = 1Ch
CAL_SMONTHNAME9                      = 1Dh
CAL_SMONTHNAME10                     = 1Eh
CAL_SMONTHNAME11                     = 1Fh
CAL_SMONTHNAME12                     = 20h
CAL_SMONTHNAME13                     = 21h
CAL_SABBREVMONTHNAME1                = 22h
CAL_SABBREVMONTHNAME2                = 23h
CAL_SABBREVMONTHNAME3                = 24h
CAL_SABBREVMONTHNAME4                = 25h
CAL_SABBREVMONTHNAME5                = 26h
CAL_SABBREVMONTHNAME6                = 27h
CAL_SABBREVMONTHNAME7                = 28h
CAL_SABBREVMONTHNAME8                = 29h
CAL_SABBREVMONTHNAME9                = 2Ah
CAL_SABBREVMONTHNAME10               = 2Bh
CAL_SABBREVMONTHNAME11               = 2Ch
CAL_SABBREVMONTHNAME12               = 2Dh
CAL_SABBREVMONTHNAME13               = 2Eh
ENUM_ALL_CALENDARS                   = 0FFFFh
CAL_GREGORIAN                        = 1
CAL_GREGORIAN_US                     = 2
CAL_JAPAN                            = 3
CAL_TAIWAN                           = 4
CAL_KOREA                            = 5
RIGHT_ALT_PRESSED                    = 1h
LEFT_ALT_PRESSED                     = 2h
RIGHT_CTRL_PRESSED                   = 4h
LEFT_CTRL_PRESSED                    = 8h
SHIFT_PRESSED                        = 10h
NUMLOCK_ON                           = 20h
SCROLLLOCK_ON                        = 40h
CAPSLOCK_ON                          = 80h
ENHANCED_KEY                         = 100h
FROM_LEFT_1ST_BUTTON_PRESSED         = 1h
RIGHTMOST_BUTTON_PRESSED             = 2h
FROM_LEFT_2ND_BUTTON_PRESSED         = 4h
FROM_LEFT_3RD_BUTTON_PRESSED         = 8h
FROM_LEFT_4TH_BUTTON_PRESSED         = 10h
MOUSE_MOVED                          = 1h
DOUBLE_CLICK                         = 2h
KEY_EVENT                            = 1h
MOUSE_EVENT                          = 2h
MENU_EVENT                           = 8h
FOCUS_EVENT                          = 10h
mouse_eventC                         = 2h
WINDOW_BUFFER_SIZE_EVENT             = 4h
FOREGROUND_BLUE                      = 1h
FOREGROUND_GREEN                     = 2h
FOREGROUND_RED                       = 4h
FOREGROUND_INTENSITY                 = 8h
BACKGROUND_BLUE                      = 10h
BACKGROUND_GREEN                     = 20h
BACKGROUND_RED                       = 40h
BACKGROUND_INTENSITY                 = 80h
CTRL_C_EVENT                         = 0
CTRL_BREAK_EVENT                     = 1
CTRL_CLOSE_EVENT                     = 2
CTRL_LOGOFF_EVENT                    = 5
CTRL_SHUTDOWN_EVENT                  = 6
ENABLE_PROCESSED_INPUT               = 1h
ENABLE_LINE_INPUT                    = 2h
ENABLE_ECHO_INPUT                    = 4h
ENABLE_WINDOW_INPUT                  = 8h
ENABLE_MOUSE_INPUT                   = 10h
ENABLE_PROCESSED_OUTPUT              = 1h
ENABLE_WRAP_AT_EOL_OUTPUT            = 2h
CONSOLE_TEXTMODE_BUFFER              = 1
R2_BLACK                             = 1
R2_NOTMERGEPEN                       = 2
R2_MASKNOTPEN                        = 3
R2_NOTCOPYPEN                        = 4
R2_MASKPENNOT                        = 5
R2_NOT                               = 6
R2_XORPEN                            = 7
R2_NOTMASKPEN                        = 8
R2_MASKPEN                           = 9
R2_NOTXORPEN                         = 10
R2_NOP                               = 11
R2_MERGENOTPEN                       = 12
R2_COPYPEN                           = 13
R2_MERGEPENNOT                       = 14
R2_MERGEPEN                          = 15
R2_WHITE                             = 16
R2_LAST                              = 16
SRCCOPY                              = 0CC0020h
SRCPAINT                             = 0EE0086h
SRCAND                               = 8800C6h
SRCINVERT                            = 660046h
SRCERASE                             = 440328h
NOTSRCCOPY                           = 330008h
NOTSRCERASE                          = 1100A6h
MERGECOPY                            = 0C000CAh
MERGEPAINT                           = 0BB0226h
PATCOPY                              = 0F00021h
PATPAINT                             = 0FB0A09h
PATINVERT                            = 5A0049h
DSTINVERT                            = 550009h
BLACKNESS                            = 42h
WHITENESS                            = 0FF0062h
GDI_ERROR                            = 0FFFFh
HGDI_ERROR                           = 0FFFFh
ERRORAPI                             = 0
NULLREGION                           = 1
SIMPLEREGION                         = 2
COMPLEXREGION                        = 3
RGN_AND                              = 1
RGN_OR                               = 2
RGN_XOR                              = 3
RGN_DIFF                             = 4
RGN_COPY                             = 5
RGN_MIN                              = RGN_AND
RGN_MAX                              = RGN_COPY
BLACKONWHITE                         = 1
WHITEONBLACK                         = 2
COLORONCOLOR                         = 3
HALFTONE                             = 4
MAXSTRETCHBLTMODE                    = 4
ALTERNATE                            = 1
WINDING                              = 2
POLYFILL_LAST                        = 2
TA_NOUPDATECP                        = 0
TA_UPDATECP                          = 1
TA_LEFT                              = 0
TA_RIGHT                             = 2
TA_CENTER                            = 6
TA_TOP                               = 0
TA_BOTTOM                            = 8
TA_BASELINE                          = 24
TA_MASK                              = TA_BASELINE + TA_CENTER + TA_UPDATECP
VTA_BASELINE                         = TA_BASELINE
VTA_LEFT                             = TA_BOTTOM
VTA_RIGHT                            = TA_TOP
VTA_CENTER                           = TA_CENTER
VTA_BOTTOM                           = TA_RIGHT
VTA_TOP                              = TA_LEFT
ETO_GRAYED                           = 1
ETO_OPAQUE                           = 2
ETO_CLIPPED                          = 4
ASPECT_FILTERING                     = 1h
DCB_RESET                            = 1h
DCB_ACCUMULATE                       = 2h
DCB_DIRTY                            = DCB_ACCUMULATE
DCB_SET                              = DCB_RESET or DCB_ACCUMULATE
DCB_ENABLE                           = 4h
DCB_DISABLE                          = 8h
META_SETBKCOLOR                      = 201h
META_SETBKMODE                       = 102h
META_SETMAPMODE                      = 103h
META_SETROP2                         = 104h
META_SETRELABS                       = 105h
META_SETPOLYFILLMODE                 = 106h
META_SETSTRETCHBLTMODE               = 107h
META_SETTEXTCHAREXTRA                = 108h
META_SETTEXTCOLOR                    = 209h
META_SETTEXTJUSTIFICATION            = 20Ah
META_SETWINDOWORG                    = 20Bh
META_SETWINDOWEXT                    = 20Ch
META_SETVIEWPORTORG                  = 20Dh
META_SETVIEWPORTEXT                  = 20Eh
META_OFFSETWINDOWORG                 = 20Fh
META_SCALEWINDOWEXT                  = 410h
META_OFFSETVIEWPORTORG               = 211h
META_SCALEVIEWPORTEXT                = 412h
META_LINETO                          = 213h
META_MOVETO                          = 214h
META_EXCLUDECLIPRECT                 = 415h
META_INTERSECTCLIPRECT               = 416h
META_ARC                             = 817h
META_ELLIPSE                         = 418h
META_FLOODFILL                       = 419h
META_PIE                             = 81Ah
META_RECTANGLE                       = 41Bh
META_ROUNDRECT                       = 61Ch
META_PATBLT                          = 61Dh
META_SAVEDC                          = 1Eh
META_SETPIXEL                        = 41Fh
META_OFFSETCLIPRGN                   = 220h
META_TEXTOUT                         = 521h
META_BITBLT                          = 922h
META_STRETCHBLT                      = 0B23h
META_POLYGON                         = 324h
META_POLYLINE                        = 325h
META_ESCAPE                          = 626h
META_RESTOREDC                       = 127h
META_FILLREGION                      = 228h
META_FRAMEREGION                     = 429h
META_INVERTREGION                    = 12Ah
META_PAINTREGION                     = 12Bh
META_SELECTCLIPREGION                = 12Ch
META_SELECTOBJECT                    = 12Dh
META_SETTEXTALIGN                    = 12Eh
META_CHORD                           = 830h
META_SETMAPPERFLAGS                  = 231h
META_EXTTEXTOUT                      = 0A32h
META_SETDIBTODEV                     = 0D33h
META_SELECTPALETTE                   = 234h
META_REALIZEPALETTE                  = 35h
META_ANIMATEPALETTE                  = 436h
META_SETPALENTRIES                   = 37h
META_POLYPOLYGON                     = 538h
META_RESIZEPALETTE                   = 139h
META_DIBBITBLT                       = 940h
META_DIBSTRETCHBLT                   = 0B41h
META_DIBCREATEPATTERNBRUSH           = 142h
META_STRETCHDIB                      = 0F43h
META_EXTFLOODFILL                    = 548h
META_DELETEOBJECT                    = 1F0h
META_CREATEPALETTE                   = 0F7h
META_CREATEPATTERNBRUSH              = 1F9h
META_CREATEPENINDIRECT               = 2FAh
META_CREATEFONTINDIRECT              = 2FBh
META_CREATEBRUSHINDIRECT             = 2FCh
META_CREATEREGION                    = 6FFh
NEWFRAME                             = 1
AbortDocC                            = 2
NEXTBAND                             = 3
SETCOLORTABLE                        = 4
GETCOLORTABLE                        = 5
FLUSHOUTPUT                          = 6
DRAFTMODE                            = 7
QUERYESCSUPPORT                      = 8
SETABORTPROC                         = 9
StartDocC                            = 10
EndDocC                              = 11
GETPHYSPAGESIZE                      = 12
GETPRINTINGOFFSET                    = 13
GETSCALINGFACTOR                     = 14
MFCOMMENT                            = 15
GETPENWIDTH                          = 16
SETCOPYCOUNT                         = 17
SELECTPAPERSOURCE                    = 18
DEVICEDATA                           = 19
PASSTHROUGH                          = 19
GETTECHNOLGY                         = 20
GETTECHNOLOGY                        = 20
SETLINECAP                           = 21
SETLINEJOIN                          = 22
SetMiterLimitC                       = 23
BANDINFO                             = 24
DRAWPATTERNRECT                      = 25
GETVECTORPENSIZE                     = 26
GETVECTORBRUSHSIZE                   = 27
ENABLEDUPLEX                         = 28
GETSETPAPERBINS                      = 29
GETSETPRINTORIENT                    = 30
ENUMPAPERBINS                        = 31
SETDIBSCALING                        = 32
EPSPRINTING                          = 33
ENUMPAPERMETRICS                     = 34
GETSETPAPERMETRICS                   = 35
POSTSCRIPT_DATA                      = 37
POSTSCRIPT_IGNORE                    = 38
MOUSETRAILS                          = 39
GETDEVICEUNITS                       = 42
GETEXTENDEDTEXTMETRICS               = 256
GETEXTENTTABLE                       = 257
GETPAIRKERNTABLE                     = 258
GETTRACKKERNTABLE                    = 259
ExtTextOutC                          = 512
GETFACENAME                          = 513
DOWNLOADFACE                         = 514
ENABLERELATIVEWIDTHS                 = 768
ENABLEPAIRKERNING                    = 769
SETKERNTRACK                         = 770
SETALLJUSTVALUES                     = 771
SETCHARSET                           = 772
StretchBltC                          = 2048
GETSETSCREENPARAMS                   = 3072
BEGIN_PATH                           = 4096
CLIP_TO_PATH                         = 4097
END_PATH                             = 4098
EXT_DEVICE_CAPS                      = 4099
RESTORE_CTM                          = 4100
SAVE_CTM                             = 4101
SET_ARC_DIRECTION                    = 4102
SET_BACKGROUND_COLOR                 = 4103
SET_POLY_MODE                        = 4104
SET_SCREEN_ANGLE                     = 4105
SET_SPREAD                           = 4106
TRANSFORM_CTM                        = 4107
SET_CLIP_BOX                         = 4108
SET_BOUNDS                           = 4109
SET_MIRROR_MODE                      = 4110
OPENCHANNEL                          = 4110
DOWNLOADHEADER                       = 4111
CLOSECHANNEL                         = 4112
POSTSCRIPT_PASSTHROUGH               = 4115
ENCAPSULATED_POSTSCRIPT              = 4116
SP_NOTREPORTED                       = 4000h
SP_ERROR                             = -1
SP_APPABORT                          = -2
SP_USERABORT                         = -3
SP_OUTOFDISK                         = -4
SP_OUTOFMEMORY                       = -5
PR_JOBSTATUS                         = 0h
OBJ_PEN                              = 1
OBJ_BRUSH                            = 2
OBJ_DC                               = 3
OBJ_METADC                           = 4
OBJ_PAL                              = 5
OBJ_FONT                             = 6
OBJ_BITMAP                           = 7
OBJ_REGION                           = 8
OBJ_METAFILE                         = 9
OBJ_MEMDC                            = 10
OBJ_EXTPEN                           = 11
OBJ_ENHMETADC                        = 12
OBJ_ENHMETAFILE                      = 13
MWT_IDENTITY                         = 1
MWT_LEFTMULTIPLY                     = 2
MWT_RIGHTMULTIPLY                    = 3
MWT_MIN                              = MWT_IDENTITY
MWT_MAX                              = MWT_RIGHTMULTIPLY
BI_RGB                               = 0
BI_RLE8                              = 1
BI_RLE4                              = 2
BI_BITFIELDS                         = 3
NTM_REGULAR                          = 40h
NTM_BOLD                             = 20h
NTM_ITALIC                           = 1h
TMPF_FIXED_PITCH                     = 1h
TMPF_VECTOR                          = 2h
TMPF_DEVICE                          = 8h
TMPF_TRUETYPE                        = 4h
LF_FACESIZE                          = 32
LF_FULLFACESIZE                      = 64
OUT_DEFAULT_PRECIS                   = 0
OUT_STRING_PRECIS                    = 1
OUT_CHARACTER_PRECIS                 = 2
OUT_STROKE_PRECIS                    = 3
OUT_TT_PRECIS                        = 4
OUT_DEVICE_PRECIS                    = 5
OUT_RASTER_PRECIS                    = 6
OUT_TT_ONLY_PRECIS                   = 7
OUT_OUTLINE_PRECIS                   = 8
CLIP_DEFAULT_PRECIS                  = 0
CLIP_CHARACTER_PRECIS                = 1
CLIP_STROKE_PRECIS                   = 2
CLIP_MASK                            = 0Fh
CLIP_LH_ANGLES                       = 16
CLIP_TT_ALWAYS                       = 32
CLIP_EMBEDDED                        = 128
DEFAULT_QUALITY                      = 0
DRAFT_QUALITY                        = 1
PROOF_QUALITY                        = 2
DEFAULT_PITCH                        = 0
FIXED_PITCH                          = 1
VARIABLE_PITCH                       = 2
ANSI_CHARSET                         = 0
DEFAULT_CHARSET                      = 1
SYMBOL_CHARSET                       = 2
SHIFTJIS_CHARSET                     = 128
GB2312_CHARSET         = 134
HANGEUL_CHARSET                      = 129
CHINESEBIG5_CHARSET                  = 136
OEM_CHARSET                          = 255
FF_DONTCARE                          = 0
FF_ROMAN                             = 16
FF_SWISS                             = 32
FF_MODERN                            = 48
FF_SCRIPT                            = 64
FF_DECORATIVE                        = 80
FW_DONTCARE                          = 0
FW_THIN                              = 100
FW_EXTRALIGHT                        = 200
FW_LIGHT                             = 300
FW_NORMAL                            = 400
FW_MEDIUM                            = 500
FW_SEMIBOLD                          = 600
FW_BOLD                              = 700
FW_EXTRABOLD                         = 800
FW_HEAVY                             = 900
FW_ULTRALIGHT                        = FW_EXTRALIGHT
FW_REGULAR                           = FW_NORMAL
FW_DEMIBOLD                          = FW_SEMIBOLD
FW_ULTRABOLD                         = FW_EXTRABOLD
FW_BLACK                             = FW_HEAVY
PANOSE_COUNT                         = 10
PAN_FAMILYTYPE_INDEX                 = 0
PAN_SERIFSTYLE_INDEX                 = 1
PAN_WEIGHT_INDEX                     = 2
PAN_PROPORTION_INDEX                 = 3
PAN_CONTRAST_INDEX                   = 4
PAN_STROKEVARIATION_INDEX            = 5
PAN_ARMSTYLE_INDEX                   = 6
PAN_LETTERFORM_INDEX                 = 7
PAN_MIDLINE_INDEX                    = 8
PAN_XHEIGHT_INDEX                    = 9
PAN_CULTURE_LATIN                    = 0
PAN_ANY                              = 0
PAN_NO_FIT                           = 1
PAN_FAMILY_TEXT_DISPLAY              = 2
PAN_FAMILY_SCRIPT                    = 3
PAN_FAMILY_DECORATIVE                = 4
PAN_FAMILY_PICTORIAL                 = 5
PAN_SERIF_COVE                       = 2
PAN_SERIF_OBTUSE_COVE                = 3
PAN_SERIF_SQUARE_COVE                = 4
PAN_SERIF_OBTUSE_SQUARE_COVE         = 5
PAN_SERIF_SQUARE                     = 6
PAN_SERIF_THIN                       = 7
PAN_SERIF_BONE                       = 8
PAN_SERIF_EXAGGERATED                = 9
PAN_SERIF_TRIANGLE                   = 10
PAN_SERIF_NORMAL_SANS                = 11
PAN_SERIF_OBTUSE_SANS                = 12
PAN_SERIF_PERP_SANS                  = 13
PAN_SERIF_FLARED                     = 14
PAN_SERIF_ROUNDED                    = 15
PAN_WEIGHT_VERY_LIGHT                = 2
PAN_WEIGHT_LIGHT                     = 3
PAN_WEIGHT_THIN                      = 4
PAN_WEIGHT_BOOK                      = 5
PAN_WEIGHT_MEDIUM                    = 6
PAN_WEIGHT_DEMI                      = 7
PAN_WEIGHT_BOLD                      = 8
PAN_WEIGHT_HEAVY                     = 9
PAN_WEIGHT_BLACK                     = 10
PAN_WEIGHT_NORD                      = 11
PAN_PROP_OLD_STYLE                   = 2
PAN_PROP_MODERN                      = 3
PAN_PROP_EVEN_WIDTH                  = 4
PAN_PROP_EXPANDED                    = 5
PAN_PROP_CONDENSED                   = 6
PAN_PROP_VERY_EXPANDED               = 7
PAN_PROP_VERY_CONDENSED              = 8
PAN_PROP_MONOSPACED                  = 9
PAN_CONTRAST_NONE                    = 2
PAN_CONTRAST_VERY_LOW                = 3
PAN_CONTRAST_LOW                     = 4
PAN_CONTRAST_MEDIUM_LOW              = 5
PAN_CONTRAST_MEDIUM                  = 6
PAN_CONTRAST_MEDIUM_HIGH             = 7
PAN_CONTRAST_HIGH                    = 8
PAN_CONTRAST_VERY_HIGH               = 9
PAN_STROKE_GRADUAL_DIAG              = 2
PAN_STROKE_GRADUAL_TRAN              = 3
PAN_STROKE_GRADUAL_VERT              = 4
PAN_STROKE_GRADUAL_HORZ              = 5
PAN_STROKE_RAPID_VERT                = 6
PAN_STROKE_RAPID_HORZ                = 7
PAN_STROKE_INSTANT_VERT              = 8
PAN_STRAIGHT_ARMS_HORZ               = 2
PAN_STRAIGHT_ARMS_WEDGE              = 3
PAN_STRAIGHT_ARMS_VERT               = 4
PAN_STRAIGHT_ARMS_SINGLE_SERIF       = 5
PAN_STRAIGHT_ARMS_DOUBLE_SERIF       = 6
PAN_BENT_ARMS_HORZ                   = 7
PAN_BENT_ARMS_WEDGE                  = 8
PAN_BENT_ARMS_VERT                   = 9
PAN_BENT_ARMS_SINGLE_SERIF           = 10
PAN_BENT_ARMS_DOUBLE_SERIF           = 11
PAN_LETT_NORMAL_CONTACT              = 2
PAN_LETT_NORMAL_WEIGHTED             = 3
PAN_LETT_NORMAL_BOXED                = 4
PAN_LETT_NORMAL_FLATTENED            = 5
PAN_LETT_NORMAL_ROUNDED              = 6
PAN_LETT_NORMAL_OFF_CENTER           = 7
PAN_LETT_NORMAL_SQUARE               = 8
PAN_LETT_OBLIQUE_CONTACT             = 9
PAN_LETT_OBLIQUE_WEIGHTED            = 10
PAN_LETT_OBLIQUE_BOXED               = 11
PAN_LETT_OBLIQUE_FLATTENED           = 12
PAN_LETT_OBLIQUE_ROUNDED             = 13
PAN_LETT_OBLIQUE_OFF_CENTER          = 14
PAN_LETT_OBLIQUE_SQUARE              = 15
PAN_MIDLINE_STANDARD_TRIMMED         = 2
PAN_MIDLINE_STANDARD_POINTED         = 3
PAN_MIDLINE_STANDARD_SERIFED         = 4
PAN_MIDLINE_HIGH_TRIMMED             = 5
PAN_MIDLINE_HIGH_POINTED             = 6
PAN_MIDLINE_HIGH_SERIFED             = 7
PAN_MIDLINE_CONSTANT_TRIMMED         = 8
PAN_MIDLINE_CONSTANT_POINTED         = 9
PAN_MIDLINE_CONSTANT_SERIFED         = 10
PAN_MIDLINE_LOW_TRIMMED              = 11
PAN_MIDLINE_LOW_POINTED              = 12
PAN_MIDLINE_LOW_SERIFED              = 13
PAN_XHEIGHT_CONSTANT_SMALL           = 2
PAN_XHEIGHT_CONSTANT_STD             = 3
PAN_XHEIGHT_CONSTANT_LARGE           = 4
PAN_XHEIGHT_DUCKING_SMALL            = 5
PAN_XHEIGHT_DUCKING_STD              = 6
PAN_XHEIGHT_DUCKING_LARGE            = 7
ELF_VENDOR_SIZE                      = 4
ELF_VERSION                          = 0
ELF_CULTURE_LATIN                    = 0
RASTER_FONTTYPE                      = 1h
DEVICE_FONTTYPE                      = 2h
TRUETYPE_FONTTYPE                    = 4h
PC_RESERVED                          = 1h
PC_EXPLICIT                          = 2h
PC_NOCOLLAPSE                        = 4h
TRANSPARENT                          = 1
OPAQUE                               = 2
BKMODE_LAST                          = 2
GM_COMPATIBLE                        = 1
GM_ADVANCED                          = 2
GM_LAST                              = 2
PT_CLOSEFIGURE                       = 1h
PT_LINETO                            = 2h
PT_BEZIERTO                          = 4h
PT_MOVETO                            = 6h
MM_TEXT                              = 1
MM_LOMETRIC                          = 2
MM_HIMETRIC                          = 3
MM_LOENGLISH                         = 4
MM_HIENGLISH                         = 5
MM_TWIPS                             = 6
MM_ISOTROPIC                         = 7
MM_ANISOTROPIC                       = 8
MM_MIN                               = MM_TEXT
MM_MAX                               = MM_ANISOTROPIC
MM_MAX_FIXEDSCALE                    = MM_TWIPS
ABSOLUTE                             = 1
RELATIVE                             = 2
WHITE_BRUSH                          = 0
LTGRAY_BRUSH                         = 1
GRAY_BRUSH                           = 2
DKGRAY_BRUSH                         = 3
BLACK_BRUSH                          = 4
NULL_BRUSH                           = 5
HOLLOW_BRUSH                         = NULL_BRUSH
WHITE_PEN                            = 6
BLACK_PEN                            = 7
NULL_PEN                             = 8
OEM_FIXED_FONT                       = 10
ANSI_FIXED_FONT                      = 11
ANSI_VAR_FONT                        = 12
SYSTEM_FONT                          = 13
DEVICE_DEFAULT_FONT                  = 14
DEFAULT_PALETTE                      = 15
SYSTEM_FIXED_FONT                    = 16
STOCK_LAST                           = 16
CLR_INVALID                          = 0FFFFh
BS_SOLID                             = 0
BS_NULL                              = 1
BS_HOLLOW                            = BS_NULL
BS_HATCHED                           = 2
BS_PATTERN                           = 3
BS_INDEXED                           = 4
BS_DIBPATTERN                        = 5
BS_DIBPATTERNPT                      = 6
BS_PATTERN8X8                        = 7
BS_DIBPATTERN8X8                     = 8
BS_PUSHBOX                           = 0Ah
HS_HORIZONTAL                        = 0
HS_VERTICAL                          = 1
HS_FDIAGONAL                         = 2
HS_BDIAGONAL                         = 3
HS_CROSS                             = 4
HS_DIAGCROSS                         = 5
HS_FDIAGONAL1                        = 6
HS_BDIAGONAL1                        = 7
HS_SOLID                             = 8
HS_DENSE1                            = 9
HS_DENSE2                            = 10
HS_DENSE3                            = 11
HS_DENSE4                            = 12
HS_DENSE5                            = 13
HS_DENSE6                            = 14
HS_DENSE7                            = 15
HS_DENSE8                            = 16
HS_NOSHADE                           = 17
HS_HALFTONE                          = 18
HS_SOLIDCLR                          = 19
HS_DITHEREDCLR                       = 20
HS_SOLIDTEXTCLR                      = 21
HS_DITHEREDTEXTCLR                   = 22
HS_SOLIDBKCLR                        = 23
HS_DITHEREDBKCLR                     = 24
HS_API_MAX                           = 25
PS_SOLID                             = 0
PS_DASH                              = 1
PS_DOT                               = 2
PS_DASHDOT                           = 3
PS_DASHDOTDOT                        = 4
PS_NULL                              = 5
PS_INSIDEFRAME                       = 6
PS_USERSTYLE                         = 7
PS_ALTERNATE                         = 8
PS_STYLE_MASK                        = 0Fh
PS_ENDCAP_ROUND                      = 0h
PS_ENDCAP_SQUARE                     = 100h
PS_ENDCAP_FLAT                       = 200h
PS_ENDCAP_MASK                       = 0F00h
PS_JOIN_ROUND                        = 0h
PS_JOIN_BEVEL                        = 1000h
PS_JOIN_MITER                        = 2000h
PS_JOIN_MASK                         = 0F000h
PS_COSMETIC                          = 0h
PS_GEOMETRIC                         = 10000h
PS_TYPE_MASK                         = 0F0000h
AD_COUNTERCLOCKWISE                  = 1
AD_CLOCKWISE                         = 2
PRF_CHECKVISIBLE                     = 00000001h
PRF_NONCLIENT                        = 00000002h
PRF_CLIENT                           = 00000004h
PRF_ERASEBKGND                       = 00000008h
PRF_CHILDREN                         = 00000010h
PRF_OWNED                            = 00000020h
BDR_RAISEDOUTER                      = 0001h
BDR_SUNKENOUTER                      = 0002h
BDR_RAISEDINNER                      = 0004h
BDR_SUNKENINNER                      = 0008h
BDR_OUTER                            = 0003h
BDR_INNER                            = 000Ch
BDR_RAISED                           = 0005h
BDR_SUNKEN                           = 000Ah
EDGE_RAISED                          = BDR_RAISEDOUTER or BDR_RAISEDINNER
EDGE_SUNKEN                          = BDR_SUNKENOUTER or BDR_SUNKENINNER
EDGE_ETCHED                          = BDR_SUNKENOUTER or BDR_RAISEDINNER
EDGE_BUMP                            = BDR_RAISEDOUTER or BDR_SUNKENINNER
BF_LEFT                              = 0001h
BF_TOP                               = 0002h
BF_RIGHT                             = 0004h
BF_BOTTOM                            = 0008h
BF_TOPLEFT                           = BF_TOP or BF_LEFT
BF_TOPRIGHT                          = BF_TOP or BF_RIGHT
BF_BOTTOMLEFT                        = BF_BOTTOM or BF_LEFT
BF_BOTTOMRIGHT                       = BF_BOTTOM or BF_RIGHT
BF_RECT                              = BF_LEFT or BF_TOP or BF_RIGHT or BF_BOTTOM
BF_DIAGONAL                          = 0010h
BF_DIAGONAL_ENDTOPRIGHT              = BF_DIAGONAL or BF_TOP or BF_RIGHT
BF_DIAGONAL_ENDTOPLEFT               = BF_DIAGONAL or BF_TOP or BF_LEFT
BF_DIAGONAL_ENDBOTTOMLEFT            = BF_DIAGONAL or BF_BOTTOM or BF_LEFT
BF_DIAGONAL_ENDBOTTOMRIGHT           = BF_DIAGONAL or BF_BOTTOM or BF_RIGHT
BF_MIDDLE                            = 0800h
BF_SOFT                              = 1000h
BF_ADJUST                            = 2000h
BF_FLAT                              = 4000h
BF_MONO                              = 8000h
DRIVERVERSION                        = 0
TECHNOLOGY                           = 2
HORZSIZE                             = 4
VERTSIZE                             = 6
HORZRES                              = 8
VERTRES                              = 10
BITSPIXEL                            = 12
PLANES                               = 14
NUMBRUSHES                           = 16
NUMPENS                              = 18
NUMMARKERS                           = 20
NUMFONTS                             = 22
NUMCOLORS                            = 24
PDEVICESIZE                          = 26
CURVECAPS                            = 28
LINECAPS                             = 30
POLYGONALCAPS                        = 32
TEXTCAPS                             = 34
CLIPCAPS                             = 36
RASTERCAPS                           = 38
ASPECTX                              = 40
ASPECTY                              = 42
ASPECTXY                             = 44
LOGPIXELSX                           = 88
LOGPIXELSY                           = 90
SIZEPALETTE                          = 104
NUMRESERVED                          = 106
COLORRES                             = 108
PHYSICALWIDTH                        = 110
PHYSICALHEIGHT                       = 111
PHYSICALOFFSETX                      = 112
PHYSICALOFFSETY                      = 113
SCALINGFACTORX                       = 114
SCALINGFACTORY                       = 115
DT_PLOTTER                           = 0
DT_RASDISPLAY                        = 1
DT_RASPRINTER                        = 2
DT_RASCAMERA                         = 3
DT_CHARSTREAM                        = 4
DT_METAFILE                          = 5
DT_DISPFILE                          = 6
CC_NONE                              = 0
CC_CIRCLES                           = 1
CC_PIE                               = 2
CC_CHORD                             = 4
CC_ELLIPSES                          = 8
CC_WIDE                              = 16
CC_STYLED                            = 32
CC_WIDESTYLED                        = 64
CC_INTERIORS                         = 128
CC_ROUNDRECT                         = 256
LC_NONE                              = 0
LC_POLYLINE                          = 2
LC_MARKER                            = 4
LC_POLYMARKER                        = 8
LC_WIDE                              = 16
LC_STYLED                            = 32
LC_WIDESTYLED                        = 64
LC_INTERIORS                         = 128
PC_NONE                              = 0
PC_POLYGON                           = 1
PC_RECTANGLE                         = 2
PC_WINDPOLYGON                       = 4
PC_TRAPEZOID                         = 4
PC_SCANLINE                          = 8
PC_WIDE                              = 16
PC_STYLED                            = 32
PC_WIDESTYLED                        = 64
PC_INTERIORS                         = 128
CP_NONE                              = 0
CP_RECTANGLE                         = 1
CP_REGION                            = 2
TC_OP_CHARACTER                      = 1h
TC_OP_STROKE                         = 2h
TC_CP_STROKE                         = 4h
TC_CR_90                             = 8h
TC_CR_ANY                            = 10h
TC_SF_X_YINDEP                       = 20h
TC_SA_DOUBLE                         = 40h
TC_SA_INTEGER                        = 80h
TC_SA_CONTIN                         = 100h
TC_EA_DOUBLE                         = 200h
TC_IA_ABLE                           = 400h
TC_UA_ABLE                           = 800h
TC_SO_ABLE                           = 1000h
TC_RA_ABLE                           = 2000h
TC_VA_ABLE                           = 4000h
TC_RESERVED                          = 8000h
TC_SCROLLBLT                         = 10000h
RC_NONE                              = 0
RC_BITBLT                            = 1
RC_BANDING                           = 2
RC_SCALING                           = 4
RC_BITMAP64                          = 8
RC_GDI20_OUTPUT                      = 10h
RC_GDI20_STATE                       = 20h
RC_SAVEBITMAP                        = 40h
RC_DI_BITMAP                         = 80h
RC_PALETTE                           = 100h
RC_DIBTODEV                          = 200h
RC_BIGFONT                           = 400h
RC_STRETCHBLT                        = 800h
RC_FLOODFILL                         = 1000h
RC_STRETCHDIB                        = 2000h
RC_OP_DX_OUTPUT                      = 4000h
RC_DEVBITS                           = 8000h
DIB_RGB_COLORS                       = 0
DIB_PAL_COLORS                       = 1
DIB_PAL_INDICES                      = 2
DIB_PAL_PHYSINDICES                  = 2
DIB_PAL_LOGINDICES                   = 4
SYSPAL_ERROR                         = 0
SYSPAL_STATIC                        = 1
SYSPAL_NOSTATIC                      = 2
CBM_CREATEDIB                        = 2h
CBM_INIT                             = 4h
FLOODFILLBORDER                      = 0
FLOODFILLSURFACE                     = 1
CCHDEVICENAME                        = 32
CCHFORMNAME                          = 32
DM_SPECVERSION                       = 320h
DM_ORIENTATION                       = 1h
DM_PAPERSIZE                         = 2h
DM_PAPERLENGTH                       = 4h
DM_PAPERWIDTH                        = 8h
DM_SCALE                             = 10h
DM_COPIES                            = 100h
DM_DEFAULTSOURCE                     = 200h
DM_PRINTQUALITY                      = 400h
DM_COLOR                             = 800h
DM_DUPLEX                            = 1000h
DM_YRESOLUTION                       = 2000h
DM_TTOPTION                          = 4000h
DM_COLLATE                           = 8000h
DM_FORMNAME                          = 10000h
DMORIENT_PORTRAIT                    = 1
DMORIENT_LANDSCAPE                   = 2
DMPAPER_LETTER                       = 1
DMPAPER_FIRST                        = DMPAPER_LETTER
DMPAPER_LETTERSMALL                  = 2
DMPAPER_TABLOID                      = 3
DMPAPER_LEDGER                       = 4
DMPAPER_LEGAL                        = 5
DMPAPER_STATEMENT                    = 6
DMPAPER_EXECUTIVE                    = 7
DMPAPER_A3                           = 8
DMPAPER_A4                           = 9
DMPAPER_A4SMALL                      = 10
DMPAPER_A5                           = 11
DMPAPER_B4                           = 12
DMPAPER_B5                           = 13
DMPAPER_FOLIO                        = 14
DMPAPER_QUARTO                       = 15
DMPAPER_10X14                        = 16
DMPAPER_11X17                        = 17
DMPAPER_NOTE                         = 18
DMPAPER_ENV_9                        = 19
DMPAPER_ENV_10                       = 20
DMPAPER_ENV_11                       = 21
DMPAPER_ENV_12                       = 22
DMPAPER_ENV_14                       = 23
DMPAPER_CSHEET                       = 24
DMPAPER_DSHEET                       = 25
DMPAPER_ESHEET                       = 26
DMPAPER_ENV_DL                       = 27
DMPAPER_ENV_C5                       = 28
DMPAPER_ENV_C3                       = 29
DMPAPER_ENV_C4                       = 30
DMPAPER_ENV_C6                       = 31
DMPAPER_ENV_C65                      = 32
DMPAPER_ENV_B4                       = 33
DMPAPER_ENV_B5                       = 34
DMPAPER_ENV_B6                       = 35
DMPAPER_ENV_ITALY                    = 36
DMPAPER_ENV_MONARCH                  = 37
DMPAPER_ENV_PERSONAL                 = 38
DMPAPER_FANFOLD_US                   = 39
DMPAPER_FANFOLD_STD_GERMAN           = 40
DMPAPER_FANFOLD_LGL_GERMAN           = 41
DMPAPER_LAST                         = DMPAPER_FANFOLD_LGL_GERMAN
DMPAPER_USER                         = 256
DMBIN_UPPER                          = 1
DMBIN_FIRST                          = DMBIN_UPPER
DMBIN_ONLYONE                        = 1
DMBIN_LOWER                          = 2
DMBIN_MIDDLE                         = 3
DMBIN_MANUAL                         = 4
DMBIN_ENVELOPE                       = 5
DMBIN_ENVMANUAL                      = 6
DMBIN_AUTO                           = 7
DMBIN_TRACTOR                        = 8
DMBIN_SMALLFMT                       = 9
DMBIN_LARGEFMT                       = 10
DMBIN_LARGECAPACITY                  = 11
DMBIN_CASSETTE                       = 14
DMBIN_LAST                           = DMBIN_CASSETTE
DMBIN_USER                           = 256
DMRES_DRAFT                          = -1
DMRES_LOW                            = -2
DMRES_MEDIUM                         = -3
DMRES_HIGH                           = -4
DMCOLOR_MONOCHROME                   = 1
DMCOLOR_COLOR                        = 2
DMDUP_SIMPLEX                        = 1
DMDUP_VERTICAL                       = 2
DMDUP_HORIZONTAL                     = 3
DMTT_BITMAP                          = 1
DMTT_DOWNLOAD                        = 2
DMTT_SUBDEV                          = 3
DMCOLLATE_FALSE                      = 0
DMCOLLATE_TRUE                       = 1
DM_GRAYSCALE                         = 1h
DM_INTERLACED                        = 2h
RDH_RECTANGLES                       = 1
GGO_METRICS                          = 0
GGO_BITMAP                           = 1
GGO_NATIVE                           = 2
TT_POLYGON_TYPE                      = 24
TT_PRIM_LINE                         = 1
TT_PRIM_QSPLINE                      = 2
TT_AVAILABLE                         = 1h
TT_ENABLED                           = 2h
DM_UPDATE                            = 1
DM_COPY                              = 2
DM_PROMPT                            = 4
DM_MODIFY                            = 8
DM_IN_BUFFER                         = DM_MODIFY
DM_IN_PROMPT                         = DM_PROMPT
DM_OUT_BUFFER                        = DM_COPY
DM_OUT_DEFAULT                       = DM_UPDATE
DC_FIELDS                            = 1
DC_PAPERS                            = 2
DC_PAPERSIZE                         = 3
DC_MINEXTENT                         = 4
DC_MAXEXTENT                         = 5
DC_BINS                              = 6
DC_DUPLEX                            = 7
DC_SIZE                              = 8
DC_EXTRA                             = 9
DC_VERSION                           = 10
DC_DRIVER                            = 11
DC_BINNAMES                          = 12
DC_ENUMRESOLUTIONS                   = 13
DC_FILEDEPENDENCIES                  = 14
DC_TRUETYPE                          = 15
DC_PAPERNAMES                        = 16
DC_ORIENTATION                       = 17
DC_COPIES                            = 18
DCTT_BITMAP                          = 1h
DCTT_DOWNLOAD                        = 2h
DCTT_SUBDEV                          = 4h
CA_NEGATIVE                          = 1h
CA_LOG_FILTER                        = 2h
ILLUMINANT_DEVICE_DEFAULT            = 0
ILLUMINANT_A                         = 1
ILLUMINANT_B                         = 2
ILLUMINANT_C                         = 3
ILLUMINANT_D50                       = 4
ILLUMINANT_D55                       = 5
ILLUMINANT_D65                       = 6
ILLUMINANT_D75                       = 7
ILLUMINANT_F2                        = 8
ILLUMINANT_MAX_INDEX                 = ILLUMINANT_F2
ILLUMINANT_TUNGSTEN                  = ILLUMINANT_A
ILLUMINANT_DAYLIGHT                  = ILLUMINANT_C
ILLUMINANT_FLUORESCENT               = ILLUMINANT_F2
ILLUMINANT_NTSC                      = ILLUMINANT_C
RGB_GAMMA_MIN                        = 2500
RGB_GAMMA_MAX                        = 65000
REFERENCE_WHITE_MIN                  = 6000
REFERENCE_WHITE_MAX                  = 10000
REFERENCE_BLACK_MIN                  = 0
REFERENCE_BLACK_MAX                  = 4000
COLOR_ADJ_MIN                        = -100
COLOR_ADJ_MAX                        = 100
FONTMAPPER_MAX                       = 10
ENHMETA_SIGNATURE                    = 464D4520h
ENHMETA_STOCK_OBJECT                 = 80000000h
EMR_HEADER                           = 1
EMR_POLYBEZIER                       = 2
EMR_POLYGON                          = 3
EMR_POLYLINE                         = 4
EMR_POLYBEZIERTO                     = 5
EMR_POLYLINETO                       = 6
EMR_POLYPOLYLINE                     = 7
EMR_POLYPOLYGON                      = 8
EMR_SETWINDOWEXTEX                   = 9
EMR_SETWINDOWORGEX                   = 10
EMR_SETVIEWPORTEXTEX                 = 11
EMR_SETVIEWPORTORGEX                 = 12
EMR_SETBRUSHORGEX                    = 13
EMR_EOF                              = 14
EMR_SETPIXELV                        = 15
EMR_SETMAPPERFLAGS                   = 16
EMR_SETMAPMODE                       = 17
EMR_SETBKMODE                        = 18
EMR_SETPOLYFILLMODE                  = 19
EMR_SETROP2                          = 20
EMR_SETSTRETCHBLTMODE                = 21
EMR_SETTEXTALIGN                     = 22
EMR_SETCOLORADJUSTMENT               = 23
EMR_SETTEXTCOLOR                     = 24
EMR_SETBKCOLOR                       = 25
EMR_OFFSETCLIPRGN                    = 26
EMR_MOVETOEX                         = 27
EMR_SETMETARGN                       = 28
EMR_EXCLUDECLIPRECT                  = 29
EMR_INTERSECTCLIPRECT                = 30
EMR_SCALEVIEWPORTEXTEX               = 31
EMR_SCALEWINDOWEXTEX                 = 32
EMR_SAVEDC                           = 33
EMR_RESTOREDC                        = 34
EMR_SETWORLDTRANSFORM                = 35
EMR_MODIFYWORLDTRANSFORM             = 36
EMR_SELECTOBJECT                     = 37
EMR_CREATEPEN                        = 38
EMR_CREATEBRUSHINDIRECT              = 39
EMR_DELETEOBJECT                     = 40
EMR_ANGLEARC                         = 41
EMR_ELLIPSE                          = 42
EMR_RECTANGLE                        = 43
EMR_ROUNDRECT                        = 44
EMR_ARC                              = 45
EMR_CHORD                            = 46
EMR_PIE                              = 47
EMR_SELECTPALETTE                    = 48
EMR_CREATEPALETTE                    = 49
EMR_SETPALETTEENTRIES                = 50
EMR_RESIZEPALETTE                    = 51
EMR_REALIZEPALETTE                   = 52
EMR_EXTFLOODFILL                     = 53
EMR_LINETO                           = 54
EMR_ARCTO                            = 55
EMR_POLYDRAW                         = 56
EMR_SETARCDIRECTION                  = 57
EMR_SETMITERLIMIT                    = 58
EMR_BEGINPATH                        = 59
EMR_ENDPATH                          = 60
EMR_CLOSEFIGURE                      = 61
EMR_FILLPATH                         = 62
EMR_STROKEANDFILLPATH                = 63
EMR_STROKEPATH                       = 64
EMR_FLATTENPATH                      = 65
EMR_WIDENPATH                        = 66
EMR_SELECTCLIPPATH                   = 67
EMR_ABORTPATH                        = 68
EMR_GDICOMMENT                       = 70
EMR_FILLRGN                          = 71
EMR_FRAMERGN                         = 72
EMR_INVERTRGN                        = 73
EMR_PAINTRGN                         = 74
EMR_EXTSELECTCLIPRGN                 = 75
EMR_BITBLT                           = 76
EMR_STRETCHBLT                       = 77
EMR_MASKBLT                          = 78
EMR_PLGBLT                           = 79
EMR_SETDIBITSTODEVICE                = 80
EMR_STRETCHDIBITS                    = 81
EMR_EXTCREATEFONTINDIRECTW           = 82
EMR_EXTTEXTOUTA                      = 83
EMR_EXTTEXTOUTW                      = 84
EMR_POLYBEZIER16                     = 85
EMR_POLYGON16                        = 86
EMR_POLYLINE16                       = 87
EMR_POLYBEZIERTO16                   = 88
EMR_POLYLINETO16                     = 89
EMR_POLYPOLYLINE16                   = 90
EMR_POLYPOLYGON16                    = 91
EMR_POLYDRAW16                       = 92
EMR_CREATEMONOBRUSH                  = 93
EMR_CREATEDIBPATTERNBRUSHPT          = 94
EMR_EXTCREATEPEN                     = 95
EMR_POLYTEXTOUTA                     = 96
EMR_POLYTEXTOUTW                     = 97
EMR_MIN                              = 1
EMR_MAX                              = 97
STRETCH_ANDSCANS                     = 1
STRETCH_ORSCANS                      = 2
STRETCH_DELETESCANS                  = 3
STRETCH_HALFTONE                     = 4
TCI_SRCCHARSET                       = 1
TCI_SRCCODEPAGE                      = 2
TCI_SRCFONTSIG                       = 3
MONO_FONT                            = 8
JOHAB_CHARSET                        = 130
HEBREW_CHARSET                       = 177
ARABIC_CHARSET                       = 178
GREEK_CHARSET                        = 161
TURKISH_CHARSET                      = 162
THAI_CHARSET                         = 222
EASTEUROPE_CHARSET                   = 238
RUSSIAN_CHARSET                      = 204
MAC_CHARSET                          = 77
BALTIC_CHARSET                       = 186
FS_LATIN1                            = 1h
FS_LATIN2                            = 2h
FS_CYRILLIC                          = 4h
FS_GREEK                             = 8h
FS_TURKISH                           = 10h
FS_HEBREW                            = 20h
FS_ARABIC                            = 40h
FS_BALTIC                            = 80h
FS_THAI                              = 10000h
FS_JISJAPAN                          = 20000h
FS_CHINESESIMP                       = 40000h
FS_WANSUNG                           = 80000h
FS_CHINESETRAD                       = 100000h
FS_JOHAB                             = 200000h
FS_SYMBOL                            = 80000000h
DEFAULT_GUI_FONT                     = 17
DM_RESERVED1                         = 800000h
DM_RESERVED2                         = 1000000h
DM_ICMMETHOD                         = 2000000h
DM_ICMINTENT                         = 4000000h
DM_MEDIATYPE                         = 8000000h
DM_DITHERTYPE                        = 10000000h
DMPAPER_ISO_B4                       = 42
DMPAPER_JAPANESE_POSTCARD            = 43
DMPAPER_9X11                         = 44
DMPAPER_10X11                        = 45
DMPAPER_15X11                        = 46
DMPAPER_ENV_INVITE                   = 47
DMPAPER_RESERVED_48                  = 48
DMPAPER_RESERVED_49                  = 49
DMPAPER_LETTER_EXTRA                 = 50
DMPAPER_LEGAL_EXTRA                  = 51
DMPAPER_TABLOID_EXTRA                = 52
DMPAPER_A4_EXTRA                     = 53
DMPAPER_LETTER_TRANSVERSE            = 54
DMPAPER_A4_TRANSVERSE                = 55
DMPAPER_LETTER_EXTRA_TRANSVERSE      = 56
DMPAPER_A_PLUS                       = 57
DMPAPER_B_PLUS                       = 58
DMPAPER_LETTER_PLUS                  = 59
DMPAPER_A4_PLUS                      = 60
DMPAPER_A5_TRANSVERSE                = 61
DMPAPER_B5_TRANSVERSE                = 62
DMPAPER_A3_EXTRA                     = 63
DMPAPER_A5_EXTRA                     = 64
DMPAPER_B5_EXTRA                     = 65
DMPAPER_A2                           = 66
DMPAPER_A3_TRANSVERSE                = 67
DMPAPER_A3_EXTRA_TRANSVERSE          = 68
DMTT_DOWNLOAD_OUTLINE                = 4
DMICMMETHOD_NONE                     = 1
DMICMMETHOD_SYSTEM                   = 2
DMICMMETHOD_DRIVER                   = 3
DMICMMETHOD_DEVICE                   = 4
DMICMMETHOD_USER                     = 256
DMICM_SATURATE                       = 1
DMICM_CONTRAST                       = 2
DMICM_COLORMETRIC                    = 3
DMICM_USER                           = 256
DMMEDIA_STANDARD                     = 1
DMMEDIA_GLOSSY                       = 2
DMMEDIA_TRANSPARENCY                 = 3
DMMEDIA_USER                         = 256
DMDITHER_NONE                        = 1
DMDITHER_COARSE                      = 2
DMDITHER_FINE                        = 3
DMDITHER_LINEART                     = 4
DMDITHER_GRAYSCALE                   = 5
DMDITHER_USER                        = 256
GGO_GRAY2_BITMAP                     = 4
GGO_GRAY4_BITMAP                     = 5
GGO_GRAY8_BITMAP                     = 6
GGO_GLYPH_INDEX                      = 80h
GCP_DBCS                             = 1h
GCP_REORDER                          = 2h
GCP_USEKERNING                       = 8h
GCP_GLYPHSHAPE                       = 10h
GCP_LIGATE                           = 20h
GCP_DIACRITIC                        = 100h
GCP_KASHIDA                          = 400h
GCP_ERROR                            = 8000h
FLI_MASK                             = 103Bh
GCP_JUSTIFY                          = 10000h
GCP_NODIACRITICS                     = 20000h
FLI_GLYPHS                           = 40000h
GCP_CLASSIN                          = 80000h
GCP_MAXEXTENT                        = 100000h
GCP_JUSTIFYIN                        = 200000h
GCP_DISPLAYZWG                       = 400000h
GCP_SYMSWAPOFF                       = 800000h
GCP_NUMERICOVERRIDE                  = 1000000h
GCP_NEUTRALOVERRIDE                  = 2000000h
GCP_NUMERICSLATIN                    = 4000000h
GCP_NUMERICSLOCAL                    = 8000000h
GCPCLASS_LATIN                       = 1
GCPCLASS_HEBREW                      = 2
GCPCLASS_ARABIC                      = 2
GCPCLASS_NEUTRAL                     = 3
GCPCLASS_LOCALNUMBER                 = 4
GCPCLASS_LATINNUMBER                 = 5
GCPCLASS_LATINNUMERICTERMINATOR      = 6
GCPCLASS_LATINNUMERICSEPARATOR       = 7
GCPCLASS_NUMERICSEPARATOR            = 8
GCPCLASS_PREBOUNDRTL                 = 80h
GCPCLASS_PREBOUNDLTR                 = 40h
DC_BINADJUST                         = 19
DC_EMF_COMPLIANT                     = 20
DC_DATATYPE_PRODUCED                 = 21
DC_COLLATE                           = 22
DCTT_DOWNLOAD_OUTLINE                = 8h
DCBA_FACEUPNONE                      = 0h
DCBA_FACEUPCENTER                    = 1h
DCBA_FACEUPLEFT                      = 2h
DCBA_FACEUPRIGHT                     = 3h
DCBA_FACEDOWNNONE                    = 100h
DCBA_FACEDOWNCENTER                  = 101h
DCBA_FACEDOWNLEFT                    = 102h
DCBA_FACEDOWNRIGHT                   = 103h
ICM_OFF                              = 1
ICM_ON                               = 2
ICM_QUERY                            = 3
EMR_SETICMMODE                       = 98
EMR_CREATECOLORSPACE                 = 99
EMR_SETCOLORSPACE                    = 100
EMR_DELETECOLORSPACE                 = 101
SB_HORZ                              = 0
SB_VERT                              = 1
SB_CTL                               = 2
SB_BOTH                              = 3
SB_LINEUP                            = 0
SB_LINELEFT                          = 0
SB_LINEDOWN                          = 1
SB_LINERIGHT                         = 1
SB_PAGEUP                            = 2
SB_PAGELEFT                          = 2
SB_PAGEDOWN                          = 3
SB_PAGERIGHT                         = 3
SB_THUMBPOSITION                     = 4
SB_THUMBTRACK                        = 5
SB_TOP                               = 6
SB_LEFT                              = 6
SB_BOTTOM                            = 7
SB_RIGHT                             = 7
SB_ENDSCROLL                         = 8
SBM_SETSCROLLINFO                    = 00E9h
SBM_GETSCROLLINFO                    = 00EAh
SIF_RANGE                            = 0001h
SIF_PAGE                             = 0002h
SIF_POS                              = 0004h
SIF_DISABLENOSCROLL                  = 0008h
SIF_TRACKPOS                         = 0010h
SIF_ALL                              = SIF_RANGE or SIF_PAGE or SIF_POS or SIF_TRACKPOS
SW_HIDE                              = 0
SW_SHOWNORMAL                        = 1
SW_NORMAL                            = 1
SW_SHOWMINIMIZED                     = 2
SW_SHOWMAXIMIZED                     = 3
SW_MAXIMIZE                          = 3
SW_SHOWNOACTIVATE                    = 4
SW_SHOW                              = 5
SW_MINIMIZE                          = 6
SW_SHOWMINNOACTIVE                   = 7
SW_SHOWNA                            = 8
SW_RESTORE                           = 9
SW_SHOWDEFAULT                       = 10
SW_MAX                               = 10
HIDE_WINDOW                          = 0
SHOW_OPENWINDOW                      = 1
SHOW_ICONWINDOW                      = 2
SHOW_FULLSCREEN                      = 3
SHOW_OPENNOACTIVATE                  = 4
SW_PARENTCLOSING                     = 1
SW_OTHERZOOM                         = 2
SW_PARENTOPENING                     = 3
SW_OTHERUNZOOM                       = 4
KF_EXTENDED                          = 100h
KF_DLGMODE                           = 800h
KF_MENUMODE                          = 1000h
KF_ALTDOWN                           = 2000h
KF_REPEAT                            = 4000h
KF_UP                                = 8000h
VK_BACK                              = 8h
VK_CANCEL                            = 3h
VK_CAPITAL                           = 14h
VK_CLEAR                             = 0Ch
VK_CONTROL                           = 11h
VK_DELETE                            = 2Eh
VK_DOWN                              = 28h
VK_END                               = 23h
VK_ESCAPE                            = 1Bh
VK_EXECUTE                           = 2Bh
VK_HELP                              = 2Fh
VK_HOME                              = 24h
VK_INSERT                            = 2Dh
VK_LBUTTON                           = 1h
VK_LEFT                              = 25h
VK_MBUTTON                           = 4h
VK_MENU                              = 12h
VK_NEXT                              = 22h
VK_PAUSE                             = 13h
VK_PGDN                              = 22h
VK_PGUP                              = 21h
VK_PRINT                             = 2Ah
VK_PRIOR                             = 21h
VK_RBUTTON                           = 2h
VK_RETURN                            = 0Dh
VK_RIGHT                             = 27h
VK_SELECT                            = 29h
VK_SHIFT                             = 10h
VK_SNAPSHOT                          = 2Ch
VK_SPACE                             = 20h
VK_TAB                               = 9h
VK_UP                                = 26h
VK_NUMPAD0                           = 60h
VK_NUMPAD1                           = 61h
VK_NUMPAD2                           = 62h
VK_NUMPAD3                           = 63h
VK_NUMPAD4                           = 64h
VK_NUMPAD5                           = 65h
VK_NUMPAD6                           = 66h
VK_NUMPAD7                           = 67h
VK_NUMPAD8                           = 68h
VK_NUMPAD9                           = 69h
VK_MULTIPLY                          = 6Ah
VK_ADD                               = 6Bh
VK_SEPARATOR                         = 6Ch
VK_SUBTRACT                          = 6Dh
VK_DECIMAL                           = 6Eh
VK_DIVIDE                            = 6Fh
VK_F1                                = 70h
VK_F2                                = 71h
VK_F3                                = 72h
VK_F4                                = 73h
VK_F5                                = 74h
VK_F6                                = 75h
VK_F7                                = 76h
VK_F8                                = 77h
VK_F9                                = 78h
VK_F10                               = 79h
VK_F11                               = 7Ah
VK_F12                               = 7Bh
VK_F13                               = 7Ch
VK_F14                               = 7Dh
VK_F15                               = 7Eh
VK_F16                               = 7Fh
VK_F17                               = 80h
VK_F18                               = 81h
VK_F19                               = 82h
VK_F20                               = 83h
VK_F21                               = 84h
VK_F22                               = 85h
VK_F23                               = 86h
VK_F24                               = 87h
VK_NUMLOCK                           = 90h
VK_SCROLL                            = 91h
VK_LSHIFT                            = 0A0h
VK_RSHIFT                            = 0A1h
VK_LCONTROL                          = 0A2h
VK_RCONTROL                          = 0A3h
VK_LMENU                             = 0A4h
VK_RMENU                             = 0A5h
VK_ATTN                              = 0F6h
VK_CRSEL                             = 0F7h
VK_EXSEL                             = 0F8h
VK_EREOF                             = 0F9h
VK_PLAY                              = 0FAh
VK_ZOOM                              = 0FBh
VK_NONAME                            = 0FCh
VK_PA1                               = 0FDh
VK_OEM_CLEAR                         = 0FEh
VK_0                         = 30h
VK_1                         = 31h
VK_2                         = 32h
VK_3                         = 33h
VK_4                         = 34h
VK_5                         = 35h
VK_6                         = 36h
VK_7                         = 37h
VK_8                         = 38h
VK_9                         = 39h
VK_A                         = 41h
VK_B                         = 42h
VK_C                         = 43h
VK_D                         = 44h
VK_E                         = 45h
VK_F                         = 46h
VK_G                         = 47h
VK_H                         = 48h
VK_I                         = 49h
VK_J                         = 4Ah
VK_K                         = 4Bh
VK_L                         = 4Ch
VK_M                         = 4Dh
VK_N                         = 4Eh
VK_O                         = 4Fh
VK_P                         = 50h
VK_Q                         = 51h
VK_R                         = 52h
VK_S                         = 53h
VK_T                         = 54h
VK_U                         = 55h
VK_V                         = 56h
VK_W                         = 57h
VK_X                         = 58h
VK_Y                         = 59h
VK_Z                         = 5Ah
WH_MIN                               = -1
WH_MSGFILTER                         = -1
WH_JOURNALRECORD                     = 0
WH_JOURNALPLAYBACK                   = 1
WH_KEYBOARD                          = 2
WH_GETMESSAGE                        = 3
WH_CALLWNDPROC                       = 4
WH_CBT                               = 5
WH_SYSMSGFILTER                      = 6
WH_MOUSE                             = 7
WH_HARDWARE                          = 8
WH_DEBUG                             = 9
WH_SHELL                             = 10
WH_FOREGROUNDIDLE                    = 11
WH_MAX                               = 11
HC_ACTION                            = 0
HC_GETNEXT                           = 1
HC_SKIP                              = 2
HC_NOREMOVE                          = 3
HC_NOREM                             = HC_NOREMOVE
HC_SYSMODALON                        = 4
HC_SYSMODALOFF                       = 5
HCBT_MOVESIZE                        = 0
HCBT_MINMAX                          = 1
HCBT_QS                              = 2
HCBT_CREATEWND                       = 3
HCBT_DESTROYWND                      = 4
HCBT_ACTIVATE                        = 5
HCBT_CLICKSKIPPED                    = 6
HCBT_KEYSKIPPED                      = 7
HCBT_SYSCOMMAND                      = 8
HCBT_SETFOCUS                        = 9
HSHELL_WINDOWCREATED                 = 1
HSHELL_WINDOWDESTROYED               = 2
HSHELL_ACTIVATESHELLWINDOW           = 3
HKL_PREV                             = 0
HKL_NEXT                             = 1
KLF_ACTIVATE                         = 1h
KLF_SUBSTITUTE_OK                    = 2h
KLF_UNLOADPREVIOUS                   = 4h
KLF_REORDER                          = 8h
KL_NAMELENGTH                        = 9
DESKTOP_READOBJECTS                  = 1h
DESKTOP_CREATEWINDOW                 = 2h
DESKTOP_CREATEMENU                   = 4h
DESKTOP_HOOKCONTROL                  = 8h
DESKTOP_JOURNALRECORD                = 10h
DESKTOP_JOURNALPLAYBACK              = 20h
DESKTOP_ENUMERATE                    = 40h
DESKTOP_WRITEOBJECTS                 = 80h
WINSTA_ENUMDESKTOPS                  = 1h
WINSTA_READATTRIBUTES                = 2h
WINSTA_ACCESSCLIPBOARD               = 4h
WINSTA_CREATEDESKTOP                 = 8h
WINSTA_WRITEATTRIBUTES               = 10h
WINSTA_ACCESSGLOBALATOMS             = 20h
WINSTA_EXITWINDOWS                   = 40h
WINSTA_ENUMERATE                     = 100h
WINSTA_READSCREEN                    = 200h
GWL_WNDPROC                          = -4
GWL_HINSTANCE                        = -6
GWL_HWNDPARENT                       = -8
GWL_STYLE                            = -16
GWL_EXSTYLE                          = -20
GWL_USERDATA                         = -21
GWL_ID                               = -12
GCL_MENUNAME                         = -8
GCL_HBRBACKGROUND                    = -10
GCL_HCURSOR                          = -12
GCL_HICON                            = -14
GCL_HMODULE                          = -16
GCL_CBWNDEXTRA                       = -18
GCL_CBCLSEXTRA                       = -20
GCL_WNDPROC                          = -24
GCL_STYLE                            = -26
GCW_ATOM                             = -32
WM_USER                              = 400h
WM_NULL                              = 0h
WM_CREATE                            = 1h
WM_DESTROY                           = 2h
WM_MOVE                              = 3h
WM_SIZE                              = 5h
WM_ACTIVATE                          = 6h
WA_INACTIVE                          = 0
WA_ACTIVE                            = 1
WA_CLICKACTIVE                       = 2
WM_SETFOCUS                          = 7h
WM_KILLFOCUS                         = 08h
WM_ENABLE                            = 0Ah
WM_SETREDRAW                         = 0Bh
WM_SETTEXT                           = 0Ch
WM_GETTEXT                           = 0Dh
WM_GETTEXTLENGTH                     = 0Eh
WM_PAINT                             = 0Fh
WM_CLOSE                             = 10h
WM_QUERYENDSESSION                   = 11h
WM_QUIT                              = 12h
WM_QUERYOPEN                         = 13h
WM_ERASEBKGND                        = 14h
WM_SYSCOLORCHANGE                    = 15h
WM_ENDSESSION                        = 16h
WM_SHOWWINDOW                        = 18h
WM_WININICHANGE                      = 1Ah
WM_SETTINGCHANGE                      = WM_WININICHANGE
WM_DEVMODECHANGE                     = 1Bh
WM_ACTIVATEAPP                       = 1Ch
WM_FONTCHANGE                        = 1Dh
WM_TIMECHANGE                        = 1Eh
WM_CANCELMODE                        = 1Fh
WM_SETCURSOR                         = 20h
WM_MOUSEACTIVATE                     = 21h
WM_CHILDACTIVATE                     = 22h
WM_QUEUESYNC                         = 23h
WM_GETMINMAXINFO                     = 24h
WM_PAINTICON                         = 26h
WM_ICONERASEBKGND                    = 27h
WM_NEXTDLGCTL                        = 28h
WM_SPOOLERSTATUS                     = 2Ah
WM_DRAWITEM                          = 2Bh
WM_MEASUREITEM                       = 2Ch
WM_DELETEITEM                        = 2Dh
WM_VKEYTOITEM                        = 2Eh
WM_CHARTOITEM                        = 2Fh
WM_SETFONT                           = 30h
WM_GETFONT                           = 31h
WM_SETHOTKEY                         = 32h
WM_GETHOTKEY                         = 33h
WM_QUERYDRAGICON                     = 37h
WM_COMPAREITEM                       = 39h
WM_GETOBJECT                          = 3Dh
WM_COMPACTING                        = 41h
WM_OTHERWINDOWCREATED                = 42h
WM_OTHERWINDOWDESTROYED              = 43h
WM_COMMNOTIFY                        = 44h
CN_RECEIVE                           = 1h
CN_TRANSMIT                          = 2h
CN_EVENT                             = 4h
WM_WINDOWPOSCHANGING                 = 46h
WM_WINDOWPOSCHANGED                  = 47h
WM_POWER                             = 48h
PWR_OK                               = 1
PWR_FAIL                             = -1
PWR_SUSPENDREQUEST                   = 1
PWR_SUSPENDRESUME                    = 2
PWR_CRITICALRESUME                   = 3
WM_COPYDATA                          = 4Ah
WM_CANCELJOURNAL                     = 4Bh
WM_NOTIFY                            = 4Eh
WM_INPUTLANGCHANGEREQUEST            = 50h
WM_INPUTLANGCHANGE                   = 51h
WM_TCARD                             = 52h
WM_HELP                              = 53h
WM_USERCHANGED                       = 54h
WM_NOTIFYFORMAT                      = 55h
WM_CONTEXTMENU                       = 7Bh
WM_STYLECHANGING                     = 7Ch
WM_STYLECHANGED                      = 7Dh
WM_DISPLAYCHANGE                     = 7Eh
WM_GETICON                           = 7Fh
WM_SETICON                           = 80h
WM_NCCREATE                          = 81h
WM_NCDESTROY                         = 82h
WM_NCCALCSIZE                        = 83h
WM_NCHITTEST                         = 84h
WM_NCPAINT                           = 85h
WM_NCACTIVATE                        = 86h
WM_GETDLGCODE                        = 87h
WM_SYNCPAINT                          = 88h
WM_NCMOUSEMOVE                       = 0A0h
WM_NCLBUTTONDOWN                     = 0A1h
WM_NCLBUTTONUP                       = 0A2h
WM_NCLBUTTONDBLCLK                   = 0A3h
WM_NCRBUTTONDOWN                     = 0A4h
WM_NCRBUTTONUP                       = 0A5h
WM_NCRBUTTONDBLCLK                   = 0A6h
WM_NCMBUTTONDOWN                     = 0A7h
WM_NCMBUTTONUP                       = 0A8h
WM_NCMBUTTONDBLCLK                   = 0A9h
WM_KEYFIRST                          = 100h
WM_KEYDOWN                           = 100h
WM_KEYUP                             = 101h
WM_CHAR                              = 102h
WM_DEADCHAR                          = 103h
WM_SYSKEYDOWN                        = 104h
WM_SYSKEYUP                          = 105h
WM_SYSCHAR                           = 106h
WM_SYSDEADCHAR                       = 107h
WM_KEYLAST                           = 108h
WM_INITDIALOG                        = 110h
WM_COMMAND                           = 111h
WM_SYSCOMMAND                        = 112h
WM_TIMER                             = 113h
WM_HSCROLL                           = 114h
WM_VSCROLL                           = 115h
WM_INITMENU                          = 116h
WM_INITMENUPOPUP                     = 117h
WM_MENUSELECT                        = 11Fh
WM_MENUCHAR                          = 120h
WM_ENTERIDLE                         = 121h
WM_CTLCOLORMSGBOX                    = 132h
WM_CTLCOLOREDIT                      = 133h
WM_CTLCOLORLISTBOX                   = 134h
WM_CTLCOLORBTN                       = 135h
WM_CTLCOLORDLG                       = 136h
WM_CTLCOLORSCROLLBAR                 = 137h
WM_CTLCOLORSTATIC                    = 138h
WM_MOUSEFIRST                        = 200h
WM_MOUSEMOVE                         = 200h
WM_LBUTTONDOWN                       = 201h
WM_LBUTTONUP                         = 202h
WM_LBUTTONDBLCLK                     = 203h
WM_RBUTTONDOWN                       = 204h
WM_RBUTTONUP                         = 205h
WM_RBUTTONDBLCLK                     = 206h
WM_MBUTTONDOWN                       = 207h
WM_MBUTTONUP                         = 208h
WM_MBUTTONDBLCLK                     = 209h
WM_MOUSELAST                         = 209h
WM_PARENTNOTIFY                      = 210h
WM_ENTERMENULOOP                     = 211h
WM_EXITMENULOOP                      = 212h
WM_MDICREATE                         = 220h
WM_MDIDESTROY                        = 221h
WM_MDIACTIVATE                       = 222h
WM_MDIRESTORE                        = 223h
WM_MDINEXT                           = 224h
WM_MDIMAXIMIZE                       = 225h
WM_MDITILE                           = 226h
WM_MDICASCADE                        = 227h
WM_MDIICONARRANGE                    = 228h
WM_MDIGETACTIVE                      = 229h
WM_MDISETMENU                        = 230h
WM_DROPFILES                         = 233h
WM_MDIREFRESHMENU                    = 234h
WM_CUT                               = 300h
WM_COPY                              = 301h
WM_PASTE                             = 302h
WM_CLEAR                             = 303h
WM_UNDO                              = 304h
WM_RENDERFORMAT                      = 305h
WM_RENDERALLFORMATS                  = 306h
WM_DESTROYCLIPBOARD                  = 307h
WM_DRAWCLIPBOARD                     = 308h
WM_PAINTCLIPBOARD                    = 309h
WM_VSCROLLCLIPBOARD                  = 30Ah
WM_SIZECLIPBOARD                     = 30Bh
WM_ASKCBFORMATNAME                   = 30Ch
WM_CHANGECBCHAIN                     = 30Dh
WM_HSCROLLCLIPBOARD                  = 30Eh
WM_QUERYNEWPALETTE                   = 30Fh
WM_PALETTEISCHANGING                 = 310h
WM_PALETTECHANGED                    = 311h
WM_HOTKEY                            = 312h
WM_PRINT                              = 317h
WM_PRINTCLIENT                       = 318h
WM_PENWINFIRST                       = 380h
WM_PENWINLAST                        = 38Fh
ST_BEGINSWP                          = 0
ST_ENDSWP                            = 1
HTERROR                              = -2
HTTRANSPARENT                        = -1
HTNOWHERE                            = 0
HTCLIENT                             = 1
HTCAPTION                            = 2
HTSYSMENU                            = 3
HTGROWBOX                            = 4
HTSIZE                               = HTGROWBOX
HTMENU                               = 5
HTHSCROLL                            = 6
HTVSCROLL                            = 7
HTMINBUTTON                          = 8
HTMAXBUTTON                          = 9
HTLEFT                               = 10
HTRIGHT                              = 11
HTTOP                                = 12
HTTOPLEFT                            = 13
HTTOPRIGHT                           = 14
HTBOTTOM                             = 15
HTBOTTOMLEFT                         = 16
HTBOTTOMRIGHT                        = 17
HTBORDER                             = 18
HTREDUCE                             = HTMINBUTTON
HTZOOM                               = HTMAXBUTTON
HTSIZEFIRST                          = HTLEFT
HTSIZELAST                           = HTBOTTOMRIGHT
HTOBJECT                          = 19
HTCLOSE                           = 20
HTHELP                           = 21
SMTO_NORMAL                          = 0h
SMTO_BLOCK                           = 1h
SMTO_ABORTIFHUNG                     = 2h
SMTO_NOTIMEOUTIFNOTHUNG               = 8
MA_ACTIVATE                          = 1
MA_ACTIVATEANDEAT                    = 2
MA_NOACTIVATE                        = 3
MA_NOACTIVATEANDEAT                  = 4
SIZE_RESTORED                        = 0
SIZE_MINIMIZED                       = 1
SIZE_MAXIMIZED                       = 2
SIZE_MAXSHOW                         = 3
SIZE_MAXHIDE                         = 4
SIZENORMAL                           = SIZE_RESTORED
SIZEICONIC                           = SIZE_MINIMIZED
SIZEFULLSCREEN                       = SIZE_MAXIMIZED
SIZEZOOMSHOW                         = SIZE_MAXSHOW
SIZEZOOMHIDE                         = SIZE_MAXHIDE
WVR_ALIGNTOP                         = 10h
WVR_ALIGNLEFT                        = 20h
WVR_ALIGNBOTTOM                      = 40h
WVR_ALIGNRIGHT                       = 80h
WVR_HREDRAW                          = 100h
WVR_VREDRAW                          = 200h
WVR_REDRAW                           = WVR_HREDRAW or WVR_VREDRAW
WVR_VALIDRECTS                       = 400h
MK_LBUTTON                           = 1h
MK_RBUTTON                           = 2h
MK_SHIFT                             = 4h
MK_CONTROL                           = 8h
MK_MBUTTON                           = 10h
WS_OVERLAPPED                        = 0h
WS_POPUP                             = 80000000h
WS_CHILD                             = 40000000h
WS_MINIMIZE                          = 20000000h
WS_VISIBLE                           = 10000000h
WS_DISABLED                          = 8000000h
WS_CLIPSIBLINGS                      = 4000000h
WS_CLIPCHILDREN                      = 2000000h
WS_MAXIMIZE                          = 1000000h
WS_CAPTION                           = 0C00000h
WS_BORDER                            = 800000h
WS_DLGFRAME                          = 400000h
WS_VSCROLL                           = 200000h
WS_HSCROLL                           = 100000h
WS_SYSMENU                           = 80000h
WS_THICKFRAME                        = 40000h
WS_GROUP                             = 20000h
WS_TABSTOP                           = 10000h
WS_MINIMIZEBOX                       = 20000h
WS_MAXIMIZEBOX                       = 10000h
WS_TILED                             = WS_OVERLAPPED
WS_ICONIC                            = WS_MINIMIZE
WS_SIZEBOX                           = WS_THICKFRAME
WS_OVERLAPPEDWINDOW                  = WS_OVERLAPPED or WS_CAPTION or WS_SYSMENU or WS_THICKFRAME or WS_MINIMIZEBOX or WS_MAXIMIZEBOX
WS_TILEDWINDOW                       = WS_OVERLAPPEDWINDOW
WS_POPUPWINDOW                       = WS_POPUP or WS_BORDER or WS_SYSMENU
WS_CHILDWINDOW                       = WS_CHILD
WS_EX_DLGMODALFRAME                  = 1h
WS_EX_NOPARENTNOTIFY                 = 4h
WS_EX_TOPMOST                        = 8h
WS_EX_ACCEPTFILES                    = 10h
WS_EX_TRANSPARENT                    = 20h
WS_EX_MDICHILD                       = 00000040h
WS_EX_TOOLWINDOW                     = 00000080h
WS_EX_WINDOWEDGE                     = 00000100h
WS_EX_CLIENTEDGE                     = 00000200h
WS_EX_CONTEXTHELP                    = 00000400h
WS_EX_RIGHT                          = 00001000h
WS_EX_LEFT                           = 00000000h
WS_EX_RTLREADING                     = 00002000h
WS_EX_LTRREADING                     = 00000000h
WS_EX_LEFTSCROLLBAR                  = 00004000h
WS_EX_RIGHTSCROLLBAR                 = 00000000h
WS_EX_CONTROLPARENT                  = 00010000h
WS_EX_STATICEDGE                     = 00020000h
WS_EX_APPWINDOW                      = 00040000h
WS_EX_OVERLAPPEDWINDOW               = WS_EX_WINDOWEDGE or WS_EX_CLIENTEDGE
WS_EX_PALETTEWINDOW                  = WS_EX_WINDOWEDGE or WS_EX_TOOLWINDOW or WS_EX_TOPMOST
CS_VREDRAW                           = 1h
CS_HREDRAW                           = 2h
CS_KEYCVTWINDOW                      = 4h
CS_DBLCLKS                           = 8h
CS_OWNDC                             = 20h
CS_CLASSDC                           = 40h
CS_PARENTDC                          = 80h
CS_NOKEYCVT                          = 100h
CS_NOCLOSE                           = 200h
CS_SAVEBITS                          = 800h
CS_BYTEALIGNCLIENT                   = 1000h
CS_BYTEALIGNWINDOW                   = 2000h
CS_PUBLICCLASS                       = 4000h
CS_GLOBALCLASS                       = CS_PUBLICCLASS
CS_IME                            = 10000h
CF_TEXT                              =  1
CF_BITMAP                            =  2
CF_METAFILEPICT                      =  3
CF_SYLK                              =  4
CF_DIF                               =  5
CF_TIFF                              =  6
CF_OEMTEXT                           =  7
CF_DIB                               =  8
CF_PALETTE                           =  9
CF_PENDATA                           = 10
CF_RIFF                              = 11
CF_WAVE                              = 12
CF_UNICODETEXT                    = 13
CF_ENHMETAFILE                    = 14
CF_HDROP                          = 15
CF_LOCALE                         = 16
CF_MAX                            = 17
CF_OWNERDISPLAY                      = 80h
CF_DSPTEXT                           = 81h
CF_DSPBITMAP                         = 82h
CF_DSPMETAFILEPICT                   = 83h
CF_DSPENHMETAFILE                    = 8Eh
CF_PRIVATEFIRST                      = 200h
CF_PRIVATELAST                       = 2FFh
CF_GDIOBJFIRST                       = 300h
CF_GDIOBJLAST                        = 3FFh
FVIRTKEY                             = 1h
FNOINVERT                            = 2h
FSHIFT                               = 4h
FCONTROL                             = 8h
FALT                                 = 10h
WPF_SETMINPOSITION                   = 1h
WPF_RESTORETOMAXIMIZED               = 2h
ODT_MENU                             = 1
ODT_LISTBOX                          = 2
ODT_COMBOBOX                         = 3
ODT_BUTTON                           = 4
ODT_STATIC                    = 5
ODA_DRAWENTIRE                       = 1h
ODA_SELECT                           = 2h
ODA_FOCUS                            = 4h
ODS_SELECTED                         = 1h
ODS_GRAYED                           = 2h
ODS_DISABLED                         = 4h
ODS_CHECKED                          = 8h
ODS_FOCUS                            = 10h
ODS_DEFAULT                       = 20h
ODS_COMBOBOXEDIT                  = 1000h
ODS_HOTLIGHT                      = 40h
ODS_INACTIVE                      = 80h
PM_NOREMOVE                          = 0h
PM_REMOVE                            = 1h
PM_NOYIELD                           = 2h
MOD_ALT                              = 1h
MOD_CONTROL                          = 2h
MOD_SHIFT                            = 4h
MOD_WIN                       = 8h
IDHOT_SNAPWINDOW                     = -1
IDHOT_SNAPDESKTOP                    = -2
EWX_LOGOFF                           = 0
EWX_SHUTDOWN                         = 1
EWX_REBOOT                           = 2
EWX_FORCE                            = 4
EWX_POWEROFF                         = 8
EWX_FORCEIFHUNG                      = 10h
EW_RESTARTWINDOWS                    = 42h
READAPI                              = 0
WRITEAPI                             = 1
READ_WRITE                           = 2
HWND_BROADCAST                       = 0FFFFh
CW_USEDEFAULT                        = 80000000h
HWND_MESSAGE                         = -3
HWND_DESKTOP                         = 0
SWP_NOSIZE                           = 1h
SWP_NOMOVE                           = 2h
SWP_NOZORDER                         = 4h
SWP_NOREDRAW                         = 8h
SWP_NOACTIVATE                       = 10h
SWP_FRAMECHANGED                     = 20h
SWP_SHOWWINDOW                       = 40h
SWP_HIDEWINDOW                       = 80h
SWP_NOCOPYBITS                       = 100h
SWP_NOOWNERZORDER                    = 200h
SWP_DRAWFRAME                        = SWP_FRAMECHANGED
SWP_NOREPOSITION                     = SWP_NOOWNERZORDER
SWP_DEFERERASE                   = 2000h
SWP_ASYNCWINDOWPOS               = 4000h
HWND_TOP                             = 0
HWND_BOTTOM                          = 1
HWND_TOPMOST                         = -1
HWND_NOTOPMOST                       = -2
DLGWINDOWEXTRA                       = 30
KEYEVENTF_EXTENDEDKEY                = 1h
KEYEVENTF_KEYUP                      = 2h
KEYEVENTF_UNICODE                    = 4h
KEYEVENTF_SCANCODE                   = 8h
MOUSEEVENTF_MOVE                     = 1h
MOUSEEVENTF_LEFTDOWN                 = 2h
MOUSEEVENTF_LEFTUP                   = 4h
MOUSEEVENTF_RIGHTDOWN                = 8h
MOUSEEVENTF_RIGHTUP                  = 10h
MOUSEEVENTF_MIDDLEDOWN               = 20h
MOUSEEVENTF_MIDDLEUP                 = 40h
MOUSEEVENTF_WHEEL                = 800h
MOUSEEVENTF_ABSOLUTE                 = 8000h
MOUSEEVENTF_XDOWN                    = 100h
MOUSEEVENTF_XUP                      = 200h
XBUTTON1                             = 1h
XBUTTON2                             = 2h
QS_KEY                               = 1h
QS_MOUSEMOVE                         = 2h
QS_MOUSEBUTTON                       = 4h
QS_POSTMESSAGE                       = 8h
QS_TIMER                             = 10h
QS_PAINT                             = 20h
QS_SENDMESSAGE                       = 40h
QS_HOTKEY                            = 80h
QS_ALLPOSTMESSAGE                 = 100h
QS_MOUSE                             = QS_MOUSEMOVE or QS_MOUSEBUTTON
QS_INPUT                             = QS_MOUSE or QS_KEY
QS_ALLEVENTS                         = QS_INPUT or QS_POSTMESSAGE or QS_TIMER or QS_PAINT or QS_HOTKEY
QS_ALLINPUT                          = QS_SENDMESSAGE or QS_PAINT or QS_TIMER or QS_POSTMESSAGE or QS_MOUSEBUTTON or QS_MOUSEMOVE or QS_HOTKEY or QS_KEY
SM_CXSCREEN                          = 0
SM_CYSCREEN                          = 1
SM_CXVSCROLL                         = 2
SM_CYHSCROLL                         = 3
SM_CYCAPTION                         = 4
SM_CXBORDER                          = 5
SM_CYBORDER                          = 6
SM_CXDLGFRAME                        = 7
SM_CYDLGFRAME                        = 8
SM_CYVTHUMB                          = 9
SM_CXHTHUMB                          = 10
SM_CXICON                            = 11
SM_CYICON                            = 12
SM_CXCURSOR                          = 13
SM_CYCURSOR                          = 14
SM_CYMENU                            = 15
SM_CXFULLSCREEN                      = 16
SM_CYFULLSCREEN                      = 17
SM_CYKANJIWINDOW                     = 18
SM_MOUSEPRESENT                      = 19
SM_CYVSCROLL                         = 20
SM_CXHSCROLL                         = 21
SM_DEBUG                             = 22
SM_SWAPBUTTON                        = 23
SM_RESERVED1                         = 24
SM_RESERVED2                         = 25
SM_RESERVED3                         = 26
SM_RESERVED4                         = 27
SM_CXMIN                             = 28
SM_CYMIN                             = 29
SM_CXSIZE                            = 30
SM_CYSIZE                            = 31
SM_CXFRAME                           = 32
SM_CYFRAME                           = 33
SM_CXMINTRACK                        = 34
SM_CYMINTRACK                        = 35
SM_CXDOUBLECLK                       = 36
SM_CYDOUBLECLK                       = 37
SM_CXICONSPACING                     = 38
SM_CYICONSPACING                     = 39
SM_MENUDROPALIGNMENT                 = 40
SM_PENWINDOWS                        = 41
SM_DBCSENABLED                       = 42
SM_CMOUSEBUTTONS                     = 43
SM_CXFIXEDFRAME                      = SM_CXDLGFRAME
SM_CYFIXEDFRAME                      = SM_CYDLGFRAME
SM_CXSIZEFRAME                       = SM_CXFRAME
SM_CYSIZEFRAME                       = SM_CYFRAME
SM_SECURE                            = 44
SM_CXEDGE                            = 45
SM_CYEDGE                            = 46
SM_CXMINSPACING                      = 47
SM_CYMINSPACING                      = 48
SM_CXSMICON                          = 49
SM_CYSMICON                          = 50
SM_CYSMCAPTION                       = 51
SM_CXSMSIZE                          = 52
SM_CYSMSIZE                          = 53
SM_CXMENUSIZE                        = 54
SM_CYMENUSIZE                        = 55
SM_ARRANGE                           = 56
SM_CXMINIMIZED                       = 57
SM_CYMINIMIZED                       = 58
SM_CXMAXTRACK                        = 59
SM_CYMAXTRACK                        = 60
SM_CXMAXIMIZED                       = 61
SM_CYMAXIMIZED                       = 62
SM_NETWORK                           = 63
SM_CLEANBOOT                         = 67
SM_CXDRAG                            = 68
SM_CYDRAG                            = 69
SM_SHOWSOUNDS                        = 70
SM_CXMENUCHECK                       = 71
SM_CYMENUCHECK                       = 72
SM_SLOWMACHINE                       = 73
SM_MIDEASTENABLED                    = 74
SM_MOUSEWHEELPRESENT                  = 75
SM_CMETRICS                          = 75
SM_XVIRTUALSCREEN                     = 76
SM_YVIRTUALSCREEN                     = 77
SM_CXVIRTUALSCREEN                    = 78
SM_CYVIRTUALSCREEN                    = 79
SM_CMONITORS                          = 80
SM_SAMEDISPLAYFORMAT                  = 81
TPM_LEFTBUTTON                       = 0h
TPM_RIGHTBUTTON                      = 2h
TPM_LEFTALIGN                        = 0h
TPM_CENTERALIGN                      = 4h
TPM_RIGHTALIGN                       = 8h
TPM_TOPALIGN                      = 0
TPM_VCENTERALIGN                  = 10h
TPM_BOTTOMALIGN                   = 20h
TPM_HORIZONTAL                    = 0
TPM_VERTICAL                      = 40h
TPM_NONOTIFY                      = 80h
TPM_RETURNCMD                     = 100h
TPM_RECURSE                       = 1
DT_TOP                               = 0h
DT_LEFT                              = 0h
DT_CENTER                            = 1h
DT_RIGHT                             = 2h
DT_VCENTER                           = 4h
DT_BOTTOM                            = 8h
DT_WORDBREAK                         = 10h
DT_SINGLELINE                        = 20h
DT_EXPANDTABS                        = 40h
DT_TABSTOP                           = 80h
DT_NOCLIP                            = 100h
DT_EXTERNALLEADING                   = 200h
DT_CALCRECT                          = 400h
DT_NOPREFIX                          = 800h
DT_INTERNAL                          = 1000h
DT_EDITCONTROL                    = 2000h
DT_PATH_ELLIPSIS                  = 4000h
DT_END_ELLIPSIS                   = 8000h
DT_MODIFYSTRING                   = 10000h
DT_RTLREADING                     = 20000h
DT_WORD_ELLIPSIS                  = 40000h
DCX_WINDOW                           = 1h
DCX_CACHE                            = 2h
DCX_NORESETATTRS                     = 4h
DCX_CLIPCHILDREN                     = 8h
DCX_CLIPSIBLINGS                     = 10h
DCX_PARENTCLIP                       = 20h
DCX_EXCLUDERGN                       = 40h
DCX_INTERSECTRGN                     = 80h
DCX_EXCLUDEUPDATE                    = 100h
DCX_INTERSECTUPDATE                  = 200h
DCX_LOCKWINDOWUPDATE                 = 400h
DCX_NORECOMPUTE                      = 100000h
DCX_VALIDATE                         = 200000h
RDW_INVALIDATE                       = 1h
RDW_INTERNALPAINT                    = 2h
RDW_ERASE                            = 4h
RDW_VALIDATE                         = 8h
RDW_NOINTERNALPAINT                  = 10h
RDW_NOERASE                          = 20h
RDW_NOCHILDREN                       = 40h
RDW_ALLCHILDREN                      = 80h
RDW_UPDATENOW                        = 100h
RDW_ERASENOW                         = 200h
RDW_FRAME                            = 400h
RDW_NOFRAME                          = 800h
SW_SCROLLCHILDREN                    = 1h
SW_INVALIDATE                        = 2h
SW_ERASE                             = 4h
SW_SMOOTHSCROLL                   = 10h
ESB_ENABLE_BOTH                      = 0h
ESB_DISABLE_BOTH                     = 3h
ESB_DISABLE_LEFT                     = 1h
ESB_DISABLE_RIGHT                    = 2h
ESB_DISABLE_UP                       = 1h
ESB_DISABLE_DOWN                     = 2h
ESB_DISABLE_LTUP                     = ESB_DISABLE_LEFT
ESB_DISABLE_RTDN                     = ESB_DISABLE_RIGHT
MB_OK                                = 0h
MB_OKCANCEL                          = 1h
MB_ABORTRETRYIGNORE                  = 2h
MB_YESNOCANCEL                       = 3h
MB_YESNO                             = 4h
MB_RETRYCANCEL                       = 5h
MB_ICONHAND                          = 10h
MB_ICONQUESTION                      = 20h
MB_ICONEXCLAMATION                   = 30h
MB_ICONASTERISK                      = 40h
MB_USERICON                   = 80h
MB_ICONERROR                         = MB_ICONHAND
MB_ICONINFORMATION                   = MB_ICONASTERISK
MB_ICONSTOP                          = MB_ICONHAND
MB_ICONWARNING                       = MB_ICONEXCLAMATION
MB_DEFBUTTON1                        = 0h
MB_DEFBUTTON2                        = 100h
MB_DEFBUTTON3                        = 200h
MB_DEFBUTTON4                         = 300h
MB_APPLMODAL                         = 0h
MB_SYSTEMMODAL                       = 1000h
MB_TASKMODAL                         = 2000h
MB_HELP                       = 4000h
MB_NOFOCUS                           = 8000h
MB_SETFOREGROUND                     = 10000h
MB_DEFAULT_DESKTOP_ONLY              = 20000h
MB_TYPEMASK                          = 0Fh
MB_ICONMASK                          = 0F0h
MB_DEFMASK                           = 0F00h
MB_MODEMASK                          = 3000h
MB_MISCMASK                          = 0C000h
MB_TOPMOST                            = 40000h
MB_RIGHT                              = 80000h
MB_RTLREADING                         = 100000h
MB_SERVICE_NOTIFICATION               = 200000h
CTLCOLOR_MSGBOX                      = 0
CTLCOLOR_EDIT                        = 1
CTLCOLOR_LISTBOX                     = 2
CTLCOLOR_BTN                         = 3
CTLCOLOR_DLG                         = 4
CTLCOLOR_SCROLLBAR                   = 5
CTLCOLOR_STATIC                      = 6
CTLCOLOR_MAX                         = 8
COLOR_SCROLLBAR                      = 0
COLOR_BACKGROUND                     = 1
COLOR_ACTIVECAPTION                  = 2
COLOR_INACTIVECAPTION                = 3
COLOR_MENU                           = 4
COLOR_WINDOW                         = 5
COLOR_WINDOWFRAME                    = 6
COLOR_MENUTEXT                       = 7
COLOR_WINDOWTEXT                     = 8
COLOR_CAPTIONTEXT                    = 9
COLOR_ACTIVEBORDER                   = 10
COLOR_INACTIVEBORDER                 = 11
COLOR_APPWORKSPACE                   = 12
COLOR_HIGHLIGHT                      = 13
COLOR_HIGHLIGHTTEXT                  = 14
COLOR_BTNFACE                        = 15
COLOR_BTNSHADOW                      = 16
COLOR_GRAYTEXT                       = 17
COLOR_BTNTEXT                        = 18
COLOR_INACTIVECAPTIONTEXT            = 19
COLOR_BTNHIGHLIGHT                   = 20
COLOR_3DDKSHADOW                     = 21
COLOR_3DLIGHT                        = 22
COLOR_INFOTEXT                       = 23
COLOR_INFOBK                         = 24
COLOR_DESKTOP                        = COLOR_BACKGROUND
COLOR_3DFACE                         = COLOR_BTNFACE
COLOR_3DSHADOW                       = COLOR_BTNSHADOW
COLOR_3DHIGHLIGHT                    = COLOR_BTNHIGHLIGHT
COLOR_3DHILIGHT                      = COLOR_BTNHIGHLIGHT
COLOR_BTNHILIGHT                     = COLOR_BTNHIGHLIGHT
COLOR_HOTLIGHT                        = 26
COLOR_GRADIENTACTIVECAPTION           = 27
COLOR_GRADIENTINACTIVECAPTION         = 28
GW_HWNDFIRST                         = 0
GW_HWNDLAST                          = 1
GW_HWNDNEXT                          = 2
GW_HWNDPREV                          = 3
GW_OWNER                             = 4
GW_CHILD                             = 5
GW_MAX                               = 5
GW_ENABLEDPOPUP                   = 6
MF_INSERT                            = 0h
MF_CHANGE                            = 80h
MF_APPEND                            = 100h
MF_DELETE                            = 200h
MF_REMOVE                            = 1000h
MF_BYCOMMAND                         = 0h
MF_BYPOSITION                        = 400h
MF_SEPARATOR                         = 800h
MF_ENABLED                           = 0h
MF_GRAYED                            = 1h
MF_DISABLED                          = 2h
MF_UNCHECKED                         = 0h
MF_CHECKED                           = 8h
MF_USECHECKBITMAPS                   = 200h
MF_STRING                            = 0h
MF_BITMAP                            = 4h
MF_OWNERDRAW                         = 100h
MF_POPUP                             = 10h
MF_MENUBARBREAK                      = 20h
MF_MENUBREAK                         = 40h
MF_UNHILITE                          = 0h
MF_HILITE                            = 80h
MF_SYSMENU                           = 2000h
MF_HELP                              = 4000h
MF_MOUSESELECT                       = 8000h
MF_END                               = 80h
MF_DEFAULT                        = 1000h
MF_RIGHTJUSTIFY                   = 4000h
SC_SIZE                              = 0F000h
SC_MOVE                              = 0F010h
SC_MINIMIZE                          = 0F020h
SC_MAXIMIZE                          = 0F030h
SC_NEXTWINDOW                        = 0F040h
SC_PREVWINDOW                        = 0F050h
SC_CLOSE                             = 0F060h
SC_VSCROLL                           = 0F070h
SC_HSCROLL                           = 0F080h
SC_MOUSEMENU                         = 0F090h
SC_KEYMENU                           = 0F100h
SC_ARRANGE                           = 0F110h
SC_RESTORE                           = 0F120h
SC_TASKLIST                          = 0F130h
SC_SCREENSAVE                        = 0F140h
SC_HOTKEY                            = 0F150h
SC_ICON                              = SC_MINIMIZE
SC_ZOOM                              = SC_MAXIMIZE
SC_DEFAULT                        = 0F160h
SC_MONITORPOWER                   = 0F170h
SC_CONTEXTHELP                    = 0F180h
SC_SEPARATOR                      = 0F00Fh
IDC_ARROW                            = 32512
IDC_IBEAM                            = 32513
IDC_WAIT                             = 32514
IDC_CROSS                            = 32515
IDC_UPARROW                          = 32516
IDC_SIZE                             = 32640
IDC_ICON                             = 32641
IDC_SIZENWSE                         = 32642
IDC_SIZENESW                         = 32643
IDC_SIZEWE                           = 32644
IDC_SIZENS                           = 32645
IDC_SIZEALL                          = 32646
IDC_NO                               = 32648
IDC_HAND                          = 32649
IDC_APPSTARTING                      = 32650
IDC_HELP                          = 32651
OBM_CLOSE                            = 32754
OBM_UPARROW                          = 32753
OBM_DNARROW                          = 32752
OBM_RGARROW                          = 32751
OBM_LFARROW                          = 32750
OBM_REDUCE                           = 32749
OBM_ZOOM                             = 32748
OBM_RESTORE                          = 32747
OBM_REDUCED                          = 32746
OBM_ZOOMD                            = 32745
OBM_RESTORED                         = 32744
OBM_UPARROWD                         = 32743
OBM_DNARROWD                         = 32742
OBM_RGARROWD                         = 32741
OBM_LFARROWD                         = 32740
OBM_MNARROW                          = 32739
OBM_COMBO                            = 32738
OBM_UPARROWI                         = 32737
OBM_DNARROWI                         = 32736
OBM_RGARROWI                         = 32735
OBM_LFARROWI                         = 32734
OBM_OLD_CLOSE                        = 32767
OBM_SIZE                             = 32766
OBM_OLD_UPARROW                      = 32765
OBM_OLD_DNARROW                      = 32764
OBM_OLD_RGARROW                      = 32763
OBM_OLD_LFARROW                      = 32762
OBM_BTSIZE                           = 32761
OBM_CHECK                            = 32760
OBM_CHECKBOXES                       = 32759
OBM_BTNCORNERS                       = 32758
OBM_OLD_REDUCE                       = 32757
OBM_OLD_ZOOM                         = 32756
OBM_OLD_RESTORE                      = 32755
OCR_NORMAL                           = 32512
OCR_IBEAM                            = 32513
OCR_WAIT                             = 32514
OCR_CROSS                            = 32515
OCR_UP                               = 32516
OCR_SIZE                             = 32640
OCR_ICON                             = 32641
OCR_SIZENWSE                         = 32642
OCR_SIZENESW                         = 32643
OCR_SIZEWE                           = 32644
OCR_SIZENS                           = 32645
OCR_SIZEALL                          = 32646
OCR_ICOCUR                           = 32647
OCR_NO                               = 32648
OCR_HAND                          = 32649
OCR_APPSTARTING                   = 32650
OIC_SAMPLE                           = 32512
OIC_HAND                             = 32513
OIC_QUES                             = 32514
OIC_BANG                             = 32515
OIC_NOTE                             = 32516
OIC_WINLOGO                       = 32517
OIC_WARNING                       = OIC_BANG
OIC_ERROR                         = OIC_HAND
OIC_INFORMATION                   = OIC_NOTE
ORD_LANGDRIVER                       = 1
IDI_APPLICATION                      = 32512
IDI_HAND                             = 32513
IDI_QUESTION                         = 32514
IDI_EXCLAMATION                      = 32515
IDI_ASTERISK                         = 32516
IDI_WINLOGO                       = 32517
IDI_WARNING                       = IDI_EXCLAMATION
IDI_ERROR                         = IDI_HAND
IDI_INFORMATION                   = IDI_ASTERISK
IDOK                                 = 1
IDCANCEL                             = 2
IDABORT                              = 3
IDRETRY                              = 4
IDIGNORE                             = 5
IDYES                                = 6
IDNO                                 = 7
IDCLOSE                              = 8
IDHELP                               = 9
ES_LEFT                              = 0h
ES_CENTER                            = 1h
ES_RIGHT                             = 2h
ES_MULTILINE                         = 4h
ES_UPPERCASE                         = 8h
ES_LOWERCASE                         = 10h
ES_PASSWORD                          = 20h
ES_AUTOVSCROLL                       = 40h
ES_AUTOHSCROLL                       = 80h
ES_NOHIDESEL                         = 100h
ES_OEMCONVERT                        = 400h
ES_READONLY                          = 800h
ES_WANTRETURN                        = 1000h
ES_NUMBER                        = 2000h

WB_LEFT                              = 0
WB_RIGHT                             = 1
WB_ISDELIMITER                       = 2
BS_PUSHBUTTON                        = 0h
BS_DEFPUSHBUTTON                     = 1h
BS_CHECKBOX                          = 2h
BS_AUTOCHECKBOX                      = 3h
BS_RADIOBUTTON                       = 4h
BS_3STATE                            = 5h
BS_AUTO3STATE                        = 6h
BS_GROUPBOX                          = 7h
BS_USERBUTTON                        = 8h
BS_AUTORADIOBUTTON                   = 9h
BS_OWNERDRAW                         = 0Bh
BS_LEFTTEXT                          = 20h
BS_BITMAP                            = 80h
BS_ICON                              = 40h
BS_TEXT                           = 0
BS_LEFT                           = 100h
BS_RIGHT                      = 200h
BS_CENTER                         = 300h
BS_TOP                            = 400h
BS_BOTTOM                         = 800h
BS_VCENTER                        = 0C00h
BS_PUSHLIKE                       = 1000h
BS_MULTILINE                      = 2000h
BS_NOTIFY                         = 4000h
BS_FLAT                           = 8000h
BS_RIGHTBUTTON                    = BS_LEFTTEXT
BN_CLICKED                           = 0
BN_PAINT                             = 1
BN_HILITE                            = 2
BN_UNHILITE                          = 3
BN_DISABLE                           = 4
BN_DOUBLECLICKED                     = 5
BN_SETFOCUS                          = 6
BN_KILLFOCUS                         = 7
BN_PUSHED                         = BN_HILITE
BN_UNPUSHED                       = BN_UNHILITE
BN_DBLCLK                         = BN_DOUBLECLICKED
BST_UNCHECKED                        = 00h
BST_CHECKED                          = 1
BST_INDETERMINATE                    = 2
BST_PUSHED                           = 4
BST_FOCUS                    = 8
BM_GETCHECK                          = 0F0h
BM_SETCHECK                          = 0F1h
BM_GETSTATE                          = 0F2h
BM_SETSTATE                          = 0F3h
BM_SETSTYLE                          = 0F4h
BM_CLICK                             = 0F5h
BM_GETIMAGE                          = 0F6h
BM_SETIMAGE                          = 0F7h
SS_LEFT                              = 0h
SS_CENTER                            = 1h
SS_RIGHT                             = 2h
SS_ICON                              = 3h
SS_BLACKRECT                         = 4h
SS_GRAYRECT                          = 5h
SS_WHITERECT                         = 6h
SS_BLACKFRAME                        = 7h
SS_GRAYFRAME                         = 8h
SS_WHITEFRAME                        = 9h
SS_USERITEM                          = 0Ah
SS_SIMPLE                            = 0Bh
SS_LEFTNOWORDWRAP                    = 0Ch
SS_NOPREFIX                          = 80h
STM_SETICON                          = 170h
STM_GETICON                          = 171h
STM_MSGMAX                           = 172h
WC_DIALOG                            = 8002h
DWL_MSGRESULT                        = 0
DWL_DLGPROC                          = 4
DWL_USER                             = 8
DDL_READWRITE                        = 0h
DDL_READONLY                         = 1h
DDL_HIDDEN                           = 2h
DDL_SYSTEM                           = 4h
DDL_DIRECTORY                        = 10h
DDL_ARCHIVE                          = 20h
DDL_POSTMSGS                         = 2000h
DDL_DRIVES                           = 4000h
DDL_EXCLUSIVE                        = 8000h
DS_ABSALIGN                          = 0001h
DS_SYSMODAL                          = 0002h
DS_3DLOOK                            = 0004h
DS_FIXEDSYS                          = 0008h
DS_NOFAILCREATE                      = 0010h
DS_LOCALEDIT                         = 0020h
DS_SETFONT                           = 0040h
DS_MODALFRAME                        = 0080h
DS_NOIDLEMSG                         = 0100h
DS_SETFOREGROUND                     = 0200h
DS_CONTROL                           = 0400h
DS_CENTER                            = 0800h
DS_CENTERMOUSE                       = 1000h
DS_CONTEXTHELP                       = 2000h
DM_GETDEFID                          = WM_USER + 0
DM_SETDEFID                          = WM_USER + 1
DC_HASDEFID                          = 534h
DLGC_WANTARROWS                      = 1h
DLGC_WANTTAB                         = 2h
DLGC_WANTALLKEYS                     = 4h
DLGC_WANTMESSAGE                     = 4h
DLGC_HASSETSEL                       = 8h
DLGC_DEFPUSHBUTTON                   = 10h
DLGC_UNDEFPUSHBUTTON                 = 20h
DLGC_RADIOBUTTON                     = 40h
DLGC_WANTCHARS                       = 80h
DLGC_STATIC                          = 100h
DLGC_BUTTON                          = 2000h
LB_CTLCODE                           = 0
LB_OKAY                              = 0
LB_ERR                               = -1
LB_ERRSPACE                          = -2
LBN_ERRSPACE                         = -2
LBN_SELCHANGE                        = 1
LBN_DBLCLK                           = 2
LBN_SELCANCEL                        = 3
LBN_SETFOCUS                         = 4
LBN_KILLFOCUS                        = 5
LB_ADDSTRING                         = 180h
LB_INSERTSTRING                      = 181h
LB_DELETESTRING                      = 182h
LB_SELITEMRANGEEX                    = 183h
LB_RESETCONTENT                      = 184h
LB_SETSEL                            = 185h
LB_SETCURSEL                         = 186h
LB_GETSEL                            = 187h
LB_GETCURSEL                         = 188h
LB_GETTEXT                           = 189h
LB_GETTEXTLEN                        = 18Ah
LB_GETCOUNT                          = 18Bh
LB_SELECTSTRING                      = 18Ch
LB_DIR                               = 18Dh
LB_GETTOPINDEX                       = 18Eh
LB_FINDSTRING                        = 18Fh
LB_GETSELCOUNT                       = 190h
LB_GETSELITEMS                       = 191h
LB_SETTABSTOPS                       = 192h
LB_GETHORIZONTALEXTENT               = 193h
LB_SETHORIZONTALEXTENT               = 194h
LB_SETCOLUMNWIDTH                    = 195h
LB_ADDFILE                           = 196h
LB_SETTOPINDEX                       = 197h
LB_GETITEMRECT                       = 198h
LB_GETITEMDATA                       = 199h
LB_SETITEMDATA                       = 19Ah
LB_SELITEMRANGE                      = 19Bh
LB_SETANCHORINDEX                    = 19Ch
LB_GETANCHORINDEX                    = 19Dh
LB_SETCARETINDEX                     = 19Eh
LB_GETCARETINDEX                     = 19Fh
LB_SETITEMHEIGHT                     = 1A0h
LB_GETITEMHEIGHT                     = 1A1h
LB_FINDSTRINGEXACT                   = 1A2h
LB_SETLOCALE                         = 1A5h
LB_GETLOCALE                         = 1A6h
LB_SETCOUNT                          = 1A7h
LB_MSGMAX                            = 1A8h
LBS_NOTIFY                           = 1h
LBS_SORT                             = 2h
LBS_NOREDRAW                         = 4h
LBS_MULTIPLESEL                      = 8h
LBS_OWNERDRAWFIXED                   = 10h
LBS_OWNERDRAWVARIABLE                = 20h
LBS_HASSTRINGS                       = 40h
LBS_USETABSTOPS                      = 80h
LBS_NOINTEGRALHEIGHT                 = 100h
LBS_MULTICOLUMN                      = 200h
LBS_WANTKEYBOARDINPUT                = 400h
LBS_EXTENDEDSEL                      = 800h
LBS_DISABLENOSCROLL                  = 1000h
LBS_NODATA                           = 2000h
LBS_STANDARD                         = LBS_NOTIFY or LBS_SORT or WS_VSCROLL or WS_BORDER
CB_OKAY                              = 0
CB_ERR                               = -1
CB_ERRSPACE                          = -2
CBN_ERRSPACE                         = -1
CBN_SELCHANGE                        = 1
CBN_DBLCLK                           = 2
CBN_SETFOCUS                         = 3
CBN_KILLFOCUS                        = 4
CBN_EDITCHANGE                       = 5
CBN_EDITUPDATE                       = 6
CBN_DROPDOWN                         = 7
CBN_CLOSEUP                          = 8
CBN_SELENDOK                         = 9
CBN_SELENDCANCEL                     = 10
CBS_SIMPLE                           = 1h
CBS_DROPDOWN                         = 2h
CBS_DROPDOWNLIST                     = 3h
CBS_OWNERDRAWFIXED                   = 10h
CBS_OWNERDRAWVARIABLE                = 20h
CBS_AUTOHSCROLL                      = 40h
CBS_OEMCONVERT                       = 80h
CBS_SORT                             = 100h
CBS_HASSTRINGS                       = 200h
CBS_NOINTEGRALHEIGHT                 = 400h
CBS_DISABLENOSCROLL                  = 800h
CB_GETEDITSEL                        = 140h
CB_LIMITTEXT                         = 141h
CB_SETEDITSEL                        = 142h
CB_ADDSTRING                         = 143h
CB_DELETESTRING                      = 144h
CB_DIR                               = 145h
CB_GETCOUNT                          = 146h
CB_GETCURSEL                         = 147h
CB_GETLBTEXT                         = 148h
CB_GETLBTEXTLEN                      = 149h
CB_INSERTSTRING                      = 14Ah
CB_RESETCONTENT                      = 14Bh
CB_FINDSTRING                        = 14Ch
CB_SELECTSTRING                      = 14Dh
CB_SETCURSEL                         = 14Eh
CB_SHOWDROPDOWN                      = 14Fh
CB_GETITEMDATA                       = 150h
CB_SETITEMDATA                       = 151h
CB_GETDROPPEDCONTROLRECT             = 152h
CB_SETITEMHEIGHT                     = 153h
CB_GETITEMHEIGHT                     = 154h
CB_SETEXTENDEDUI                     = 155h
CB_GETEXTENDEDUI                     = 156h
CB_GETDROPPEDSTATE                   = 157h
CB_FINDSTRINGEXACT                   = 158h
CB_SETLOCALE                         = 159h
CB_GETLOCALE                         = 15Ah
CB_GETTOPINDEX                       = 15Bh
CB_SETTOPINDEX                       = 15Ch
CB_GETHORIZONTALEXTENT               = 15Dh
CB_SETHORIZONTALEXTENT               = 15Eh
CB_GETDROPPEDWIDTH                   = 15Fh
CB_SETDROPPEDWIDTH                   = 160h
CB_INITSTORAGE                       = 161h
CB_MSGMAX                            = 162h
SBS_HORZ                             = 0h
SBS_VERT                             = 1h
SBS_TOPALIGN                         = 2h
SBS_LEFTALIGN                        = 2h
SBS_BOTTOMALIGN                      = 4h
SBS_RIGHTALIGN                       = 4h
SBS_SIZEBOXTOPLEFTALIGN              = 2h
SBS_SIZEBOXBOTTOMRIGHTALIGN          = 4h
SBS_SIZEBOX                          = 8h
SBS_SIZEGRIP                         = 10h
SBM_SETPOS                           = 0E0h
SBM_GETPOS                           = 0E1h
SBM_SETRANGE                         = 0E2h
SBM_SETRANGEREDRAW                   = 0E6h
SBM_GETRANGE                         = 0E3h
SBM_ENABLE_ARROWS                    = 0E4h
MDIS_ALLCHILDSTYLES                  = 1h
MDITILE_VERTICAL                     = 0h
MDITILE_HORIZONTAL                   = 1h
MDITILE_SKIPDISABLED                 = 2h
HELP_CONTEXT                         = 1h
HELP_QUIT                            = 2h
HELP_INDEX                           = 3h
HELP_CONTENTS                        = 3h
HELP_HELPONHELP                      = 4h
HELP_SETINDEX                        = 5h
HELP_SETCONTENTS                     = 5h
HELP_CONTEXTPOPUP                    = 8h
HELP_FORCEFILE                       = 9h
HELP_KEY                             = 101h
HELP_COMMAND                         = 102h
HELP_PARTIALKEY                      = 105h
HELP_MULTIKEY                        = 201h
HELP_SETWINPOS                       = 203h
HELP_CONTEXTMENU                     = 000Ah
HELP_FINDER                          = 000Bh
HELP_WM_HELP                         = 000Ch
HELP_SETPOPUP_POS                    = 000Dh
HELP_TCARD                           = 8000h
HELP_TCARD_DATA                      = 0010h
HELP_TCARD_OTHER_CALLER              = 0011h
IDH_NO_HELP                          = 28440
IDH_MISSING_CONTEXT                  = 28441
IDH_GENERIC_HELP_BUTTON              = 28442
IDH_OK                               = 28443
IDH_CANCEL                           = 28444
IDH_HELP                             = 28445
SPI_GETBEEP                          = 1
SPI_SETBEEP                          = 2
SPI_GETMOUSE                         = 3
SPI_SETMOUSE                         = 4
SPI_GETBORDER                        = 5
SPI_SETBORDER                        = 6
SPI_GETKEYBOARDSPEED                 = 10
SPI_SETKEYBOARDSPEED                 = 11
SPI_LANGDRIVER                       = 12
SPI_ICONHORIZONTALSPACING            = 13
SPI_GETSCREENSAVETIMEOUT             = 14
SPI_SETSCREENSAVETIMEOUT             = 15
SPI_GETSCREENSAVEACTIVE              = 16
SPI_SETSCREENSAVEACTIVE              = 17
SPI_GETGRIDGRANULARITY               = 18
SPI_SETGRIDGRANULARITY               = 19
SPI_SETDESKWALLPAPER                 = 20
SPI_SETDESKPATTERN                   = 21
SPI_GETKEYBOARDDELAY                 = 22
SPI_SETKEYBOARDDELAY                 = 23
SPI_ICONVERTICALSPACING              = 24
SPI_GETICONTITLEWRAP                 = 25
SPI_SETICONTITLEWRAP                 = 26
SPI_GETMENUDROPALIGNMENT             = 27
SPI_SETMENUDROPALIGNMENT             = 28
SPI_SETDOUBLECLKWIDTH                = 29
SPI_SETDOUBLECLKHEIGHT               = 30
SPI_GETICONTITLELOGFONT              = 31
SPI_SETDOUBLECLICKTIME               = 32
SPI_SETMOUSEBUTTONSWAP               = 33
SPI_SETICONTITLELOGFONT              = 34
SPI_GETFASTTASKSWITCH                = 35
SPI_SETFASTTASKSWITCH                = 36
SPI_SETDRAGFULLWINDOWS               = 37
SPI_GETDRAGFULLWINDOWS               = 38
SPI_GETNONCLIENTMETRICS              = 41
SPI_SETNONCLIENTMETRICS              = 42
SPI_GETMINIMIZEDMETRICS              = 43
SPI_SETMINIMIZEDMETRICS              = 44
SPI_GETICONMETRICS                   = 45
SPI_SETICONMETRICS                   = 46
SPI_SETWORKAREA                      = 47
SPI_GETWORKAREA                      = 48
SPI_SETPENWINDOWS                    = 49
SPI_GETFILTERKEYS                    = 50
SPI_SETFILTERKEYS                    = 51
SPI_GETTOGGLEKEYS                    = 52
SPI_SETTOGGLEKEYS                    = 53
SPI_GETMOUSEKEYS                     = 54
SPI_SETMOUSEKEYS                     = 55
SPI_GETSHOWSOUNDS                    = 56
SPI_SETSHOWSOUNDS                    = 57
SPI_GETSTICKYKEYS                    = 58
SPI_SETSTICKYKEYS                    = 59
SPI_GETACCESSTIMEOUT                 = 60
SPI_SETACCESSTIMEOUT                 = 61
SPI_GETSERIALKEYS                    = 62
SPI_SETSERIALKEYS                    = 63
SPI_GETSOUNDSENTRY                   = 64
SPI_SETSOUNDSENTRY                   = 65
SPI_GETHIGHCONTRAST                  = 66
SPI_SETHIGHCONTRAST                  = 67
SPI_GETKEYBOARDPREF                  = 68
SPI_SETKEYBOARDPREF                  = 69
SPI_GETSCREENREADER                  = 70
SPI_SETSCREENREADER                  = 71
SPI_GETANIMATION                     = 72
SPI_SETANIMATION                     = 73
SPI_GETFONTSMOOTHING                 = 74
SPI_SETFONTSMOOTHING                 = 75
SPI_SETDRAGWIDTH                     = 76
SPI_SETDRAGHEIGHT                    = 77
SPI_SETHANDHELD                      = 78
SPI_GETLOWPOWERTIMEOUT               = 79
SPI_GETPOWEROFFTIMEOUT               = 80
SPI_SETLOWPOWERTIMEOUT               = 81
SPI_SETPOWEROFFTIMEOUT               = 82
SPI_GETLOWPOWERACTIVE                = 83
SPI_GETPOWEROFFACTIVE                = 84
SPI_SETLOWPOWERACTIVE                = 85
SPI_SETPOWEROFFACTIVE                = 86
SPI_SETCURSORS                       = 87
SPI_SETICONS                         = 88
SPI_GETDEFAULTINPUTLANG              = 89
SPI_SETDEFAULTINPUTLANG              = 90
SPI_SETLANGTOGGLE                    = 91
SPI_GETWINDOWSEXTENSION              = 92
SPI_SETMOUSETRAILS                   = 93
SPI_GETMOUSETRAILS                   = 94
SPI_SCREENSAVERRUNNING               = 97
SPIF_UPDATEINIFILE                   = 1h
SPIF_SENDWININICHANGE                = 2h
WM_DDE_FIRST                         = 3E0h
WM_DDE_INITIATE                      = WM_DDE_FIRST
WM_DDE_TERMINATE                     = WM_DDE_FIRST + 1
WM_DDE_ADVISE                        = WM_DDE_FIRST + 2
WM_DDE_UNADVISE                      = WM_DDE_FIRST + 3
WM_DDE_ACK                           = WM_DDE_FIRST + 4
WM_DDE_DATA                          = WM_DDE_FIRST + 5
WM_DDE_REQUEST                       = WM_DDE_FIRST + 6
WM_DDE_POKE                          = WM_DDE_FIRST + 7
WM_DDE_EXECUTE                       = WM_DDE_FIRST + 8
WM_DDE_LAST                          = WM_DDE_FIRST + 8
XST_NULL                             = 0
XST_INCOMPLETE                       = 1
XST_CONNECTED                        = 2
XST_INIT1                            = 3
XST_INIT2                            = 4
XST_REQSENT                          = 5
XST_DATARCVD                         = 6
XST_POKESENT                         = 7
XST_POKEACKRCVD                      = 8
XST_EXECSENT                         = 9
XST_EXECACKRCVD                      = 10
XST_ADVSENT                          = 11
XST_UNADVSENT                        = 12
XST_ADVACKRCVD                       = 13
XST_UNADVACKRCVD                     = 14
XST_ADVDATASENT                      = 15
XST_ADVDATAACKRCVD                   = 16
CADV_LATEACK                         = 0FFFFh
ST_CONNECTED                         = 1h
ST_ADVISE                            = 2h
ST_ISLOCAL                           = 4h
ST_BLOCKED                           = 8h
ST_CLIENT                            = 10h
ST_TERMINATED                        = 20h
ST_INLIST                            = 40h
ST_BLOCKNEXT                         = 80h
ST_ISSELF                            = 100h
DDE_FACK                             = 8000h
DDE_FBUSY                            = 4000h
DDE_FDEFERUPD                        = 4000h
DDE_FACKREQ                          = 8000h
DDE_FRELEASE                         = 2000h
DDE_FREQUESTED                       = 1000h
DDE_FAPPSTATUS                       = 0FFh
DDE_FNOTPROCESSED                    = 0h
DDE_FACKRESERVED                     = not DDE_FACK or DDE_FBUSY or DDE_FAPPSTATUS
DDE_FADVRESERVED                     = not DDE_FACKREQ or DDE_FDEFERUPD
DDE_FDATRESERVED                     = not DDE_FACKREQ or DDE_FRELEASE or DDE_FREQUESTED
DDE_FPOKRESERVED                     = not DDE_FRELEASE
CP_WINANSI                           = 1004
CP_WINUNICODE                        = 1200
XTYPF_NOBLOCK                        = 2h
XTYPF_NODATA                         = 4h
XTYPF_ACKREQ                         = 8h
XCLASS_MASK                          = 0FC00h
XCLASS_BOOL                          = 1000h
XCLASS_DATA                          = 2000h
XCLASS_FLAGS                         = 4000h
XCLASS_NOTIFICATION                  = 8000h
XTYP_ERROR                           = 0h or XCLASS_NOTIFICATION or XTYPF_NOBLOCK
XTYP_ADVDATA                         = 10h or XCLASS_FLAGS
XTYP_ADVREQ                          = 20h or XCLASS_DATA or XTYPF_NOBLOCK
XTYP_ADVSTART                        = 30h or XCLASS_BOOL
XTYP_ADVSTOP                         = 40h or XCLASS_NOTIFICATION
XTYP_EXECUTE                         = 50h or XCLASS_FLAGS
XTYP_CONNECT                         = 60h or XCLASS_BOOL or XTYPF_NOBLOCK
XTYP_CONNECT_CONFIRM                 = 70h or XCLASS_NOTIFICATION or XTYPF_NOBLOCK
XTYP_XACT_COMPLETE                   = 80h or XCLASS_NOTIFICATION
XTYP_POKE                            = 90h or XCLASS_FLAGS
XTYP_REGISTER                        = 0A0h or XCLASS_NOTIFICATION or XTYPF_NOBLOCK
XTYP_REQUEST                         = 0B0h or XCLASS_DATA
XTYP_DISCONNECT                      = 0C0h or XCLASS_NOTIFICATION or XTYPF_NOBLOCK
XTYP_UNREGISTER                      = 0D0h or XCLASS_NOTIFICATION or XTYPF_NOBLOCK
XTYP_WILDCONNECT                     = 0E0h or XCLASS_DATA or XTYPF_NOBLOCK
XTYP_MASK                            = 0F0h
XTYP_SHIFT                           = 4
TIMEOUT_ASYNC                        = 0FFFFh
QID_SYNC                             = 0FFFFh
CBR_BLOCK                            = 0FFFFh
CBF_FAIL_SELFCONNECTIONS             = 1000h
CBF_FAIL_CONNECTIONS                 = 2000h
CBF_FAIL_ADVISES                     = 4000h
CBF_FAIL_EXECUTES                    = 8000h
CBF_FAIL_POKES                       = 10000h
CBF_FAIL_REQUESTS                    = 20000h
CBF_FAIL_ALLSVRXACTIONS              = 3F000h
CBF_SKIP_CONNECT_CONFIRMS            = 40000h
CBF_SKIP_REGISTRATIONS               = 80000h
CBF_SKIP_UNREGISTRATIONS             = 100000h
CBF_SKIP_DISCONNECTS                 = 200000h
CBF_SKIP_ALLNOTIFICATIONS            = 3C0000h
APPCMD_CLIENTONLY                    = 10h
APPCMD_FILTERINITS                   = 20h
APPCMD_MASK                          = 0FF0h
APPCLASS_STANDARD                    = 0h
APPCLASS_MASK                        = 0Fh
EC_ENABLEALL                         = 0
EC_ENABLEONE                         = ST_BLOCKNEXT
EC_DISABLE                           = ST_BLOCKED
EC_QUERYWAITING                      = 2
DNS_REGISTER                         = 1h
DNS_UNREGISTER                       = 2h
DNS_FILTERON                         = 4h
DNS_FILTEROFF                        = 8h
HDATA_APPOWNED                       = 1h
DMLERR_NO_ERROR                      = 0
DMLERR_FIRST                         = 4000h
DMLERR_ADVACKTIMEOUT                 = 4000h
DMLERR_BUSY                          = 4001h
DMLERR_DATAACKTIMEOUT                = 4002h
DMLERR_DLL_NOT_INITIALIZED           = 4003h
DMLERR_DLL_USAGE                     = 4004h
DMLERR_EXECACKTIMEOUT                = 4005h
DMLERR_INVALIDPARAMETER              = 4006h
DMLERR_LOW_MEMORY                    = 4007h
DMLERR_MEMORY_ERROR                  = 4008h
DMLERR_NOTPROCESSED                  = 4009h
DMLERR_NO_CONV_ESTABLISHED           = 400Ah
DMLERR_POKEACKTIMEOUT                = 400Bh
DMLERR_POSTMSG_FAILED                = 400Ch
DMLERR_REENTRANCY                    = 400Dh
DMLERR_SERVER_DIED                   = 400Eh
DMLERR_SYS_ERROR                     = 400Fh
DMLERR_UNADVACKTIMEOUT               = 4010h
DMLERR_UNFOUND_QUEUE_ID              = 4011h
DMLERR_LAST                          = 4011h
MH_CREATE                            = 1
MH_KEEP                              = 2
MH_DELETE                            = 3
MH_CLEANUP                           = 4
MAX_MONITORS                         = 4
APPCLASS_MONITOR                     = 1h
XTYP_MONITOR                         = 0F0h or XCLASS_NOTIFICATION or XTYPF_NOBLOCK
MF_HSZ_INFO                          = 1000000h
MF_SENDMSGS                          = 2000000h
MF_POSTMSGS                          = 4000000h
MF_CALLBACKS                         = 8000000h
MF_ERRORS                            = 10000000h
MF_LINKS                             = 20000000h
MF_CONV                              = 40000000h
MF_MASK                              = 0FF000000h
NO_ERROR                             = 0
ERROR_SUCCESS                        = 0
ERROR_INVALID_FUNCTION               = 1
ERROR_FILE_NOT_FOUND                 = 2
ERROR_PATH_NOT_FOUND                 = 3
ERROR_TOO_MANY_OPEN_FILES            = 4
ERROR_ACCESS_DENIED                  = 5
ERROR_INVALID_HANDLE                 = 6
ERROR_ARENA_TRASHED                  = 7
ERROR_NOT_ENOUGH_MEMORY              = 8
ERROR_INVALID_BLOCK                  = 9
ERROR_BAD_ENVIRONMENT                = 10
ERROR_BAD_FORMAT                     = 11
ERROR_INVALID_ACCESS                 = 12
ERROR_INVALID_DATA                   = 13
ERROR_OUTOFMEMORY                    = 14
ERROR_INVALID_DRIVE                  = 15
ERROR_CURRENT_DIRECTORY              = 16
ERROR_NOT_SAME_DEVICE                = 17
ERROR_NO_MORE_FILES                  = 18
ERROR_WRITE_PROTECT                  = 19
ERROR_BAD_UNIT                       = 20
ERROR_NOT_READY                      = 21
ERROR_BAD_COMMAND                    = 22
ERROR_CRC                            = 23
ERROR_BAD_LENGTH                     = 24
ERROR_SEEK                           = 25
ERROR_NOT_DOS_DISK                   = 26
ERROR_SECTOR_NOT_FOUND               = 27
ERROR_OUT_OF_PAPER                   = 28
ERROR_WRITE_FAULT                    = 29
ERROR_READ_FAULT                     = 30
ERROR_GEN_FAILURE                    = 31
ERROR_SHARING_VIOLATION              = 32
ERROR_LOCK_VIOLATION                 = 33
ERROR_WRONG_DISK                     = 34
ERROR_SHARING_BUFFER_EXCEEDED        = 36
ERROR_HANDLE_EOF                     = 38
ERROR_HANDLE_DISK_FULL               = 39
ERROR_NOT_SUPPORTED                  = 50
ERROR_REM_NOT_LIST                   = 51
ERROR_DUP_NAME                       = 52
ERROR_BAD_NETPATH                    = 53
ERROR_NETWORK_BUSY                   = 54
ERROR_DEV_NOT_EXIST                  = 55
ERROR_TOO_MANY_CMDS                  = 56
ERROR_ADAP_HDW_ERR                   = 57
ERROR_BAD_NET_RESP                   = 58
ERROR_UNEXP_NET_ERR                  = 59
ERROR_BAD_REM_ADAP                   = 60
ERROR_PRINTQ_FULL                    = 61
ERROR_NO_SPOOL_SPACE                 = 62
ERROR_PRINT_CANCELLED                = 63
ERROR_NETNAME_DELETED                = 64
ERROR_NETWORK_ACCESS_DENIED          = 65
ERROR_BAD_DEV_TYPE                   = 66
ERROR_BAD_NET_NAME                   = 67
ERROR_TOO_MANY_NAMES                 = 68
ERROR_TOO_MANY_SESS                  = 69
ERROR_SHARING_PAUSED                 = 70
ERROR_REQ_NOT_ACCEP                  = 71
ERROR_REDIR_PAUSED                   = 72
ERROR_FILE_EXISTS                    = 80
ERROR_CANNOT_MAKE                    = 82
ERROR_FAIL_I24                       = 83
ERROR_OUT_OF_STRUCTURES              = 84
ERROR_ALREADY_ASSIGNED               = 85
ERROR_INVALID_PASSWORD               = 86
ERROR_INVALID_PARAMETER              = 87
ERROR_NET_WRITE_FAULT                = 88
ERROR_NO_PROC_SLOTS                  = 89
ERROR_TOO_MANY_SEMAPHORES            = 100
ERROR_EXCL_SEM_ALREADY_OWNED         = 101
ERROR_SEM_IS_SET                     = 102
ERROR_TOO_MANY_SEM_REQUESTS          = 103
ERROR_INVALID_AT_INTERRUPT_TIME      = 104
ERROR_SEM_OWNER_DIED                 = 105
ERROR_SEM_USER_LIMIT                 = 106
ERROR_DISK_CHANGE                    = 107
ERROR_DRIVE_LOCKED                   = 108
ERROR_BROKEN_PIPE                    = 109
ERROR_OPEN_FAILED                    = 110
ERROR_BUFFER_OVERFLOW                = 111
ERROR_DISK_FULL                      = 112
ERROR_NO_MORE_SEARCH_HANDLES         = 113
ERROR_INVALID_TARGET_HANDLE          = 114
ERROR_INVALID_CATEGORY               = 117
ERROR_INVALID_VERIFY_SWITCH          = 118
ERROR_BAD_DRIVER_LEVEL               = 119
ERROR_CALL_NOT_IMPLEMENTED           = 120
ERROR_SEM_TIMEOUT                    = 121
ERROR_INSUFFICIENT_BUFFER            = 122
ERROR_INVALID_NAME                   = 123
ERROR_INVALID_LEVEL                  = 124
ERROR_NO_VOLUME_LABEL                = 125
ERROR_MOD_NOT_FOUND                  = 126
ERROR_PROC_NOT_FOUND                 = 127
ERROR_WAIT_NO_CHILDREN               = 128
ERROR_CHILD_NOT_COMPLETE             = 129
ERROR_DIRECT_ACCESS_HANDLE           = 130
ERROR_NEGATIVE_SEEK                  = 131
ERROR_SEEK_ON_DEVICE                 = 132
ERROR_IS_JOIN_TARGET                 = 133
ERROR_IS_JOINED                      = 134
ERROR_IS_SUBSTED                     = 135
ERROR_NOT_JOINED                     = 136
ERROR_NOT_SUBSTED                    = 137
ERROR_JOIN_TO_JOIN                   = 138
ERROR_SUBST_TO_SUBST                 = 139
ERROR_JOIN_TO_SUBST                  = 140
ERROR_SUBST_TO_JOIN                  = 141
ERROR_BUSY_DRIVE                     = 142
ERROR_SAME_DRIVE                     = 143
ERROR_DIR_NOT_ROOT                   = 144
ERROR_DIR_NOT_EMPTY                  = 145
ERROR_IS_SUBST_PATH                  = 146
ERROR_IS_JOIN_PATH                   = 147
ERROR_PATH_BUSY                      = 148
ERROR_IS_SUBST_TARGET                = 149
ERROR_SYSTEM_TRACE                   = 150
ERROR_INVALID_EVENT_COUNT            = 151
ERROR_TOO_MANY_MUXWAITERS            = 152
ERROR_INVALID_LIST_FORMAT            = 153
ERROR_LABEL_TOO_LONG                 = 154
ERROR_TOO_MANY_TCBS                  = 155
ERROR_SIGNAL_REFUSED                 = 156
ERROR_DISCARDED                      = 157
ERROR_NOT_LOCKED                     = 158
ERROR_BAD_THREADID_ADDR              = 159
ERROR_BAD_ARGUMENTS                  = 160
ERROR_BAD_PATHNAME                   = 161
ERROR_SIGNAL_PENDING                 = 162
ERROR_MAX_THRDS_REACHED              = 164
ERROR_LOCK_FAILED                    = 167
ERROR_BUSY                           = 170
ERROR_CANCEL_VIOLATION               = 173
ERROR_ATOMIC_LOCKS_NOT_SUPPORTED     = 174
ERROR_INVALID_SEGMENT_NUMBER         = 180
ERROR_INVALID_ORDINAL                = 182
ERROR_ALREADY_EXISTS                 = 183
ERROR_INVALID_FLAG_NUMBER            = 186
ERROR_SEM_NOT_FOUND                  = 187
ERROR_INVALID_STARTING_CODESEG       = 188
ERROR_INVALID_STACKSEG               = 189
ERROR_INVALID_MODULETYPE             = 190
ERROR_INVALID_EXE_SIGNATURE          = 191
ERROR_EXE_MARKED_INVALID             = 192
ERROR_BAD_EXE_FORMAT                 = 193
ERROR_ITERATED_DATA_EXCEEDS_64k      = 194
ERROR_INVALID_MINALLOCSIZE           = 195
ERROR_DYNLINK_FROM_INVALID_RING      = 196
ERROR_IOPL_NOT_ENABLED               = 197
ERROR_INVALID_SEGDPL                 = 198
ERROR_AUTODATASEG_EXCEEDS_64k        = 199
ERROR_RING2SEG_MUST_BE_MOVABLE       = 200
ERROR_RELOC_CHAIN_XEEDS_SEGLIM       = 201
ERROR_INFLOOP_IN_RELOC_CHAIN         = 202
ERROR_ENVVAR_NOT_FOUND               = 203
ERROR_NO_SIGNAL_SENT                 = 205
ERROR_FILENAME_EXCED_RANGE           = 206
ERROR_RING2_STACK_IN_USE             = 207
ERROR_META_EXPANSION_TOO_LONG        = 208
ERROR_INVALID_SIGNAL_NUMBER          = 209
ERROR_THREAD_1_INACTIVE              = 210
ERROR_LOCKED                         = 212
ERROR_TOO_MANY_MODULES               = 214
ERROR_NESTING_NOT_ALLOWED            = 215
ERROR_BAD_PIPE                       = 230
ERROR_PIPE_BUSY                      = 231
ERROR_NO_DATA                        = 232
ERROR_PIPE_NOT_CONNECTED             = 233
ERROR_MORE_DATA                      = 234
ERROR_VC_DISCONNECTED                = 240
ERROR_INVALID_EA_NAME                = 254
ERROR_EA_LIST_INCONSISTENT           = 255
ERROR_NO_MORE_ITEMS                  = 259
ERROR_CANNOT_COPY                    = 266
ERROR_DIRECTORY                      = 267
ERROR_EAS_DIDNT_FIT                  = 275
ERROR_EA_FILE_CORRUPT                = 276
ERROR_EA_TABLE_FULL                  = 277
ERROR_INVALID_EA_HANDLE              = 278
ERROR_EAS_NOT_SUPPORTED              = 282
ERROR_NOT_OWNER                      = 288
ERROR_TOO_MANY_POSTS                 = 298
ERROR_MR_MID_NOT_FOUND               = 317
ERROR_INVALID_ADDRESS                = 487
ERROR_ARITHMETIC_OVERFLOW            = 534
ERROR_PIPE_CONNECTED                 = 535
ERROR_PIPE_LISTENING                 = 536
ERROR_EA_ACCESS_DENIED               = 994
ERROR_OPERATION_ABORTED              = 995
ERROR_IO_INCOMPLETE                  = 996
ERROR_IO_PENDING                     = 997
ERROR_NOACCESS                       = 998
ERROR_SWAPERROR                      = 999
ERROR_STACK_OVERFLOW                 = 1001
ERROR_INVALID_MESSAGE                = 1002
ERROR_CAN_NOT_COMPLETE               = 1003
ERROR_INVALID_FLAGS                  = 1004
ERROR_UNRECOGNIZED_VOLUME            = 1005
ERROR_FILE_INVALID                   = 1006
ERROR_FULLSCREEN_MODE                = 1007
ERROR_NO_TOKEN                       = 1008
ERROR_BADDB                          = 1009
ERROR_BADKEY                         = 1010
ERROR_CANTOPEN                       = 1011
ERROR_CANTREAD                       = 1012
ERROR_CANTWRITE                      = 1013
ERROR_REGISTRY_RECOVERED             = 1014
ERROR_REGISTRY_CORRUPT               = 1015
ERROR_REGISTRY_IO_FAILED             = 1016
ERROR_NOT_REGISTRY_FILE              = 1017
ERROR_KEY_DELETED                    = 1018
ERROR_NO_LOG_SPACE                   = 1019
ERROR_KEY_HAS_CHILDREN               = 1020
ERROR_CHILD_MUST_BE_VOLATILE         = 1021
ERROR_NOTIFY_ENUM_DIR                = 1022
ERROR_DEPENDENT_SERVICES_RUNNING     = 1051
ERROR_INVALID_SERVICE_CONTROL        = 1052
ERROR_SERVICE_REQUEST_TIMEOUT        = 1053
ERROR_SERVICE_NO_THREAD              = 1054
ERROR_SERVICE_DATABASE_LOCKED        = 1055
ERROR_SERVICE_ALREADY_RUNNING        = 1056
ERROR_INVALID_SERVICE_ACCOUNT        = 1057
ERROR_SERVICE_DISABLED               = 1058
ERROR_CIRCULAR_DEPENDENCY            = 1059
ERROR_SERVICE_DOES_NOT_EXIST         = 1060
ERROR_SERVICE_CANNOT_ACCEPT_CTRL     = 1061
ERROR_SERVICE_NOT_ACTIVE             = 1062
ERROR_FAILED_SERVICE_CONTROLLER_CONNECT              = 1063
ERROR_EXCEPTION_IN_SERVICE           = 1064
ERROR_DATABASE_DOES_NOT_EXIST        = 1065
ERROR_SERVICE_SPECIFIC_ERROR         = 1066
ERROR_PROCESS_ABORTED                = 1067
ERROR_SERVICE_DEPENDENCY_FAIL        = 1068
ERROR_SERVICE_LOGON_FAILED           = 1069
ERROR_SERVICE_START_HANG             = 1070
ERROR_INVALID_SERVICE_LOCK           = 1071
ERROR_SERVICE_MARKED_FOR_DELETE      = 1072
ERROR_SERVICE_EXISTS                 = 1073
ERROR_ALREADY_RUNNING_LKG            = 1074
ERROR_SERVICE_DEPENDENCY_DELETED     = 1075
ERROR_BOOT_ALREADY_ACCEPTED          = 1076
ERROR_SERVICE_NEVER_STARTED          = 1077
ERROR_DUPLICATE_SERVICE_NAME         = 1078
ERROR_END_OF_MEDIA                   = 1100
ERROR_FILEMARK_DETECTED              = 1101
ERROR_BEGINNING_OF_MEDIA             = 1102
ERROR_SETMARK_DETECTED               = 1103
ERROR_NO_DATA_DETECTED               = 1104
ERROR_PARTITION_FAILURE              = 1105
ERROR_INVALID_BLOCK_LENGTH           = 1106
ERROR_DEVICE_NOT_PARTITIONED         = 1107
ERROR_UNABLE_TO_LOCK_MEDIA           = 1108
ERROR_UNABLE_TO_UNLOAD_MEDIA         = 1109
ERROR_MEDIA_CHANGED                  = 1110
ERROR_BUS_RESET                      = 1111
ERROR_NO_MEDIA_IN_DRIVE              = 1112
ERROR_NO_UNICODE_TRANSLATION         = 1113
ERROR_DLL_INIT_FAILED                = 1114
ERROR_SHUTDOWN_IN_PROGRESS           = 1115
ERROR_NO_SHUTDOWN_IN_PROGRESS        = 1116
ERROR_IO_DEVICE                      = 1117
ERROR_SERIAL_NO_DEVICE               = 1118
ERROR_IRQ_BUSY                       = 1119
ERROR_MORE_WRITES                    = 1120
ERROR_COUNTER_TIMEOUT                = 1121
ERROR_FLOPPY_ID_MARK_NOT_FOUND       = 1122
ERROR_FLOPPY_WRONG_CYLINDER          = 1123
ERROR_FLOPPY_UNKNOWN_ERROR           = 1124
ERROR_FLOPPY_BAD_REGISTERS           = 1125
ERROR_DISK_RECALIBRATE_FAILED        = 1126
ERROR_DISK_OPERATION_FAILED          = 1127
ERROR_DISK_RESET_FAILED              = 1128
ERROR_EOM_OVERFLOW                   = 1129
ERROR_NOT_ENOUGH_SERVER_MEMORY       = 1130
ERROR_POSSIBLE_DEADLOCK              = 1131
ERROR_MAPPED_ALIGNMENT               = 1132

ERROR_OLD_WIN_VERSION                = 1150
ERROR_SINGLE_INSTANCE_APP            = 1152

ERROR_INVALID_PIXEL_FORMAT           = 2000
ERROR_BAD_DRIVER                     = 2001
ERROR_INVALID_WINDOW_STYLE           = 2002
ERROR_METAFILE_NOT_SUPPORTED         = 2003
ERROR_TRANSFORM_NOT_SUPPORTED        = 2004
ERROR_CLIPPING_NOT_SUPPORTED         = 2005
ERROR_UNKNOWN_PRINT_MONITOR          = 3000
ERROR_PRINTER_DRIVER_IN_USE          = 3001
ERROR_SPOOL_FILE_NOT_FOUND           = 3002
ERROR_SPL_NO_STARTDOC                = 3003
ERROR_SPL_NO_ADDJOB                  = 3004
ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED              = 3005
ERROR_PRINT_MONITOR_ALREADY_INSTALLED                = 3006
ERROR_WINS_INTERNAL                  = 4000
ERROR_CAN_NOT_DEL_LOCAL_WINS         = 4001
ERROR_STATIC_INIT                    = 4002
ERROR_INC_BACKUP                     = 4003
ERROR_FULL_BACKUP                    = 4004
ERROR_REC_NON_EXISTENT               = 4005
ERROR_RPL_NOT_ALLOWED                = 4006
SEVERITY_SUCCESS                     = 0
SEVERITY_ERROR                       = 1
FACILITY_NT_BIT                      = 10000000h
NOERROR                              = 0
E_UNEXPECTED                         = 8000FFFFh
E_NOTIMPL                            = 80004001h
E_OUTOFMEMORY                        = 8007000Eh
E_INVALIDARG                         = 80070057h
E_NOINTERFACE                        = 80004002h
E_POINTER                            = 80004003h
E_HANDLE                             = 80070006h
E_ABORT                              = 80004004h
E_FAIL                               = 80004005h
E_ACCESSDENIED                       = 80070005h
CO_E_INIT_TLS                        = 80004006h
CO_E_INIT_SHARED_ALLOCATOR           = 80004007h
CO_E_INIT_MEMORY_ALLOCATOR           = 80004008h
CO_E_INIT_CLASS_CACHE                = 80004009h
CO_E_INIT_RPC_CHANNEL                = 8000400Ah
CO_E_INIT_TLS_SET_CHANNEL_CONTROL    = 8000400Bh
CO_E_INIT_TLS_CHANNEL_CONTROL        = 8000400Ch
CO_E_INIT_UNACCEPTED_USER_ALLOCATOR  = 8000400Dh
CO_E_INIT_SCM_MUTEX_EXISTS           = 8000400Eh
CO_E_INIT_SCM_FILE_MAPPING_EXISTS    = 8000400Fh
CO_E_INIT_SCM_MAP_VIEW_OF_FILE       = 80004010h
CO_E_INIT_SCM_EXEC_FAILURE           = 80004011h
CO_E_INIT_ONLY_SINGLE_THREADED       = 80004012h
S_OK                                 = 0h
S_FALSE                              = 1h
OLE_E_FIRST                          = 80040000h
OLE_E_LAST                           = 800400FFh
OLE_S_FIRST                          = 40000h
OLE_S_LAST                           = 400FFh
OLE_E_OLEVERB                        = 80040000h
OLE_E_ADVF                           = 80040001h
OLE_E_ENUM_NOMORE                    = 80040002h
OLE_E_ADVISENOTSUPPORTED             = 80040003h
OLE_E_NOCONNECTION                   = 80040004h
OLE_E_NOTRUNNING                     = 80040005h
OLE_E_NOCACHE                        = 80040006h
OLE_E_BLANK                          = 80040007h
OLE_E_CLASSDIFF                      = 80040008h
OLE_E_CANT_GETMONIKER                = 80040009h
OLE_E_CANT_BINDTOSOURCE              = 8004000Ah
OLE_E_STATIC                         = 8004000Bh
OLE_E_PROMPTSAVECANCELLED            = 8004000Ch
OLE_E_INVALIDRECT                    = 8004000Dh
OLE_E_WRONGCOMPOBJ                   = 8004000Eh
OLE_E_INVALIDHWND                    = 8004000Fh
OLE_E_NOT_INPLACEACTIVE              = 80040010h
OLE_E_CANTCONVERT                    = 80040011h
OLE_E_NOSTORAGE                      = 80040012h
DV_E_FORMATETC                       = 80040064h
DV_E_DVTARGETDEVICE                  = 80040065h
DV_E_STGMEDIUM                       = 80040066h
DV_E_STATDATA                        = 80040067h
DV_E_LINDEX                          = 80040068h
DV_E_TYMED                           = 80040069h
DV_E_CLIPFORMAT                      = 8004006Ah
DV_E_DVASPECT                        = 8004006Bh
DV_E_DVTARGETDEVICE_SIZE             = 8004006Ch
DV_E_NOIVIEWOBJECT                   = 8004006Dh
DRAGDROP_E_FIRST                     = 80040100h
DRAGDROP_E_LAST                      = 8004010Fh
DRAGDROP_S_FIRST                     = 40100h
DRAGDROP_S_LAST                      = 4010Fh
DRAGDROP_E_NOTREGISTERED             = 80040100h
DRAGDROP_E_ALREADYREGISTERED         = 80040101h
DRAGDROP_E_INVALIDHWND               = 80040102h
CLASSFACTORY_E_FIRST                 = 80040110h
CLASSFACTORY_E_LAST                  = 8004011Fh
CLASSFACTORY_S_FIRST                 = 40110h
CLASSFACTORY_S_LAST                  = 4011Fh
CLASS_E_NOAGGREGATION                = 80040110h
CLASS_E_CLASSNOTAVAILABLE            = 80040111h
MARSHAL_E_FIRST                      = 80040120h
MARSHAL_E_LAST                       = 8004012Fh
MARSHAL_S_FIRST                      = 40120h
MARSHAL_S_LAST                       = 4012Fh
DATA_E_FIRST                         = 80040130h
DATA_E_LAST                          = 8004013Fh
DATA_S_FIRST                         = 40130h
DATA_S_LAST                          = 4013Fh
VIEW_E_FIRST                         = 80040140h
VIEW_E_LAST                          = 8004014Fh
VIEW_S_FIRST                         = 40140h
VIEW_S_LAST                          = 4014Fh
VIEW_E_DRAW                          = 80040140h
REGDB_E_FIRST                        = 80040150h
REGDB_E_LAST                         = 8004015Fh
REGDB_S_FIRST                        = 40150h
REGDB_S_LAST                         = 4015Fh
REGDB_E_READREGDB                    = 80040150h
REGDB_E_WRITEREGDB                   = 80040151h
REGDB_E_KEYMISSING                   = 80040152h
REGDB_E_INVALIDVALUE                 = 80040153h
REGDB_E_CLASSNOTREG                  = 80040154h
REGDB_E_IIDNOTREG                    = 80040155h
CACHE_E_FIRST                        = 80040170h
CACHE_E_LAST                         = 8004017Fh
CACHE_S_FIRST                        = 40170h
CACHE_S_LAST                         = 4017Fh
CACHE_E_NOCACHE_UPDATED              = 80040170h
OLEOBJ_E_FIRST                       = 80040180h
OLEOBJ_E_LAST                        = 8004018Fh
OLEOBJ_S_FIRST                       = 40180h
OLEOBJ_S_LAST                        = 4018Fh
OLEOBJ_E_NOVERBS                     = 80040180h
OLEOBJ_E_INVALIDVERB                 = 80040181h
CLIENTSITE_E_FIRST                   = 80040190h
CLIENTSITE_E_LAST                    = 8004019Fh
CLIENTSITE_S_FIRST                   = 40190h
CLIENTSITE_S_LAST                    = 4019Fh
INPLACE_E_NOTUNDOABLE                = 800401A0h
INPLACE_E_NOTOOLSPACE                = 800401A1h
INPLACE_E_FIRST                      = 800401A0h
INPLACE_E_LAST                       = 800401AFh
INPLACE_S_FIRST                      = 401A0h
INPLACE_S_LAST                       = 401AFh
ENUM_E_FIRST                         = 800401B0h
ENUM_E_LAST                          = 800401BFh
ENUM_S_FIRST                         = 401B0h
ENUM_S_LAST                          = 401BFh
CONVERT10_E_FIRST                    = 800401C0h
CONVERT10_E_LAST                     = 800401CFh
CONVERT10_S_FIRST                    = 401C0h
CONVERT10_S_LAST                     = 401CFh
CONVERT10_E_OLESTREAM_GET            = 800401C0h
CONVERT10_E_OLESTREAM_PUT            = 800401C1h
CONVERT10_E_OLESTREAM_FMT            = 800401C2h
CONVERT10_E_OLESTREAM_BITMAP_TO_DIB  = 800401C3h
CONVERT10_E_STG_FMT                  = 800401C4h
CONVERT10_E_STG_NO_STD_STREAM        = 800401C5h
CONVERT10_E_STG_DIB_TO_BITMAP        = 800401C6h
CLIPBRD_E_FIRST                      = 800401D0h
CLIPBRD_E_LAST                       = 800401DFh
CLIPBRD_S_FIRST                      = 401D0h
CLIPBRD_S_LAST                       = 401DFh
CLIPBRD_E_CANT_OPEN                  = 800401D0h
CLIPBRD_E_CANT_EMPTY                 = 800401D1h
CLIPBRD_E_CANT_SET                   = 800401D2h
CLIPBRD_E_BAD_DATA                   = 800401D3h
CLIPBRD_E_CANT_CLOSE                 = 800401D4h
MK_E_FIRST                           = 800401E0h
MK_E_LAST                            = 800401EFh
MK_S_FIRST                           = 401E0h
MK_S_LAST                            = 401EFh
MK_E_CONNECTMANUALLY                 = 800401E0h
MK_E_EXCEEDEDDEADLINE                = 800401E1h
MK_E_NEEDGENERIC                     = 800401E2h
MK_E_UNAVAILABLE                     = 800401E3h
MK_E_SYNTAX                          = 800401E4h
MK_E_NOOBJECT                        = 800401E5h
MK_E_INVALIDEXTENSION                = 800401E6h
MK_E_INTERMEDIATEINTERFACENOTSUPPORTED               = 800401E7h
MK_E_NOTBINDABLE                     = 800401E8h
MK_E_NOTBOUND                        = 800401E9h
MK_E_CANTOPENFILE                    = 800401EAh
MK_E_MUSTBOTHERUSER                  = 800401EBh
MK_E_NOINVERSE                       = 800401ECh
MK_E_NOSTORAGE                       = 800401EDh
MK_E_NOPREFIX                        = 800401EEh
MK_E_ENUMERATION_FAILED              = 800401EFh
CO_E_FIRST                           = 800401F0h
CO_E_LAST                            = 800401FFh
CO_S_FIRST                           = 401F0h
CO_S_LAST                            = 401FFh
CO_E_NOTINITIALIZED                  = 800401F0h
CO_E_ALREADYINITIALIZED              = 800401F1h
CO_E_CANTDETERMINECLASS              = 800401F2h
CO_E_CLASSSTRING                     = 800401F3h
CO_E_IIDSTRING                       = 800401F4h
CO_E_APPNOTFOUND                     = 800401F5h
CO_E_APPSINGLEUSE                    = 800401F6h
CO_E_ERRORINAPP                      = 800401F7h
CO_E_DLLNOTFOUND                     = 800401F8h
CO_E_ERRORINDLL                      = 800401F9h
CO_E_WRONGOSFORAPP                   = 800401FAh
CO_E_OBJNOTREG                       = 800401FBh
CO_E_OBJISREG                        = 800401FCh
CO_E_OBJNOTCONNECTED                 = 800401FDh
CO_E_APPDIDNTREG                     = 800401FEh
CO_E_RELEASED                        = 800401FFh
OLE_S_USEREG                         = 40000h
OLE_S_STATIC                         = 40001h
OLE_S_MAC_CLIPFORMAT                 = 40002h
DRAGDROP_S_DROP                      = 40100h
DRAGDROP_S_CANCEL                    = 40101h
DRAGDROP_S_USEDEFAULTCURSORS         = 40102h
DATA_S_SAMEFORMATETC                 = 40130h
VIEW_S_ALREADY_FROZEN                = 40140h
CACHE_S_FORMATETC_NOTSUPPORTED       = 40170h
CACHE_S_SAMECACHE                    = 40171h
CACHE_S_SOMECACHES_NOTUPDATED        = 40172h
OLEOBJ_S_INVALIDVERB                 = 40180h
OLEOBJ_S_CANNOT_DOVERB_NOW           = 40181h
OLEOBJ_S_INVALIDHWND                 = 40182h
INPLACE_S_TRUNCATED                  = 401A0h
CONVERT10_S_NO_PRESENTATION          = 401C0h
MK_S_REDUCED_TO_SELF                 = 401E2h
MK_S_ME                              = 401E4h
MK_S_HIM                             = 401E5h
MK_S_US                              = 401E6h
MK_S_MONIKERALREADYREGISTERED        = 401E7h
CO_E_CLASS_CREATE_FAILED             = 80080001h
CO_E_SCM_ERROR                       = 80080002h
CO_E_SCM_RPC_FAILURE                 = 80080003h
CO_E_BAD_PATH                        = 80080004h
CO_E_SERVER_EXEC_FAILURE             = 80080005h
CO_E_OBJSRV_RPC_FAILURE              = 80080006h
MK_E_NO_NORMALIZED                   = 80080007h
CO_E_SERVER_STOPPING                 = 80080008h
MEM_E_INVALID_ROOT                   = 80080009h
MEM_E_INVALID_LINK                   = 80080010h
MEM_E_INVALID_SIZE                   = 80080011h
DISP_E_UNKNOWNINTERFACE              = 80020001h
DISP_E_MEMBERNOTFOUND                = 80020003h
DISP_E_PARAMNOTFOUND                 = 80020004h
DISP_E_TYPEMISMATCH                  = 80020005h
DISP_E_UNKNOWNNAME                   = 80020006h
DISP_E_NONAMEDARGS                   = 80020007h
DISP_E_BADVARTYPE                    = 80020008h
DISP_E_EXCEPTION                     = 80020009h
DISP_E_OVERFLOW                      = 8002000Ah
DISP_E_BADINDEX                      = 8002000Bh
DISP_E_UNKNOWNLCID                   = 8002000Ch
DISP_E_ARRAYISLOCKED                 = 8002000Dh
DISP_E_BADPARAMCOUNT                 = 8002000Eh
DISP_E_PARAMNOTOPTIONAL              = 8002000Fh
DISP_E_BADCALLEE                     = 80020010h
DISP_E_NOTACOLLECTION                = 80020011h
TYPE_E_BUFFERTOOSMALL                = 80028016h
TYPE_E_INVDATAREAD                   = 80028018h
TYPE_E_UNSUPFORMAT                   = 80028019h
TYPE_E_REGISTRYACCESS                = 8002801Ch
TYPE_E_LIBNOTREGISTERED              = 8002801Dh
TYPE_E_UNDEFINEDTYPE                 = 80028027h
TYPE_E_QUALIFIEDNAMEDISALLOWED       = 80028028h
TYPE_E_INVALIDSTATE                  = 80028029h
TYPE_E_WRONGTYPEKIND                 = 8002802Ah
TYPE_E_ELEMENTNOTFOUND               = 8002802Bh
TYPE_E_AMBIGUOUSNAME                 = 8002802Ch
TYPE_E_NAMECONFLICT                  = 8002802Dh
TYPE_E_UNKNOWNLCID                   = 8002802Eh
TYPE_E_DLLFUNCTIONNOTFOUND           = 8002802Fh
TYPE_E_BADMODULEKIND                 = 800288BDh
TYPE_E_SIZETOOBIG                    = 800288C5h
TYPE_E_DUPLICATEID                   = 800288C6h
TYPE_E_INVALIDID                     = 800288CFh
TYPE_E_TYPEMISMATCH                  = 80028CA0h
TYPE_E_OUTOFBOUNDS                   = 80028CA1h
TYPE_E_IOERROR                       = 80028CA2h
TYPE_E_CANTCREATETMPFILE             = 80028CA3h
TYPE_E_CANTLOADLIBRARY               = 80029C4Ah
TYPE_E_INCONSISTENTPROPFUNCS         = 80029C83h
TYPE_E_CIRCULARTYPE                  = 80029C84h
STG_E_INVALIDFUNCTION                = 80030001h
STG_E_FILENOTFOUND                   = 80030002h
STG_E_PATHNOTFOUND                   = 80030003h
STG_E_TOOMANYOPENFILES               = 80030004h
STG_E_ACCESSDENIED                   = 80030005h
STG_E_INVALIDHANDLE                  = 80030006h
STG_E_INSUFFICIENTMEMORY             = 80030008h
STG_E_INVALIDPOINTER                 = 80030009h
STG_E_NOMOREFILES                    = 80030012h
STG_E_DISKISWRITEPROTECTED           = 80030013h
STG_E_SEEKERROR                      = 80030019h
STG_E_WRITEFAULT                     = 8003001Dh
STG_E_READFAULT                      = 8003001Eh
STG_E_SHAREVIOLATION                 = 80030020h
STG_E_LOCKVIOLATION                  = 80030021h
STG_E_FILEALREADYEXISTS              = 80030050h
STG_E_INVALIDPARAMETER               = 80030057h
STG_E_MEDIUMFULL                     = 80030070h
STG_E_ABNORMALAPIEXIT                = 800300FAh
STG_E_INVALIDHEADER                  = 800300FBh
STG_E_INVALIDNAME                    = 800300FCh
STG_E_UNKNOWN                        = 800300FDh
STG_E_UNIMPLEMENTEDFUNCTION          = 800300FEh
STG_E_INVALIDFLAG                    = 800300FFh
STG_E_INUSE                          = 80030100h
STG_E_NOTCURRENT                     = 80030101h
STG_E_REVERTED                       = 80030102h
STG_E_CANTSAVE                       = 80030103h
STG_E_OLDFORMAT                      = 80030104h
STG_E_OLDDLL                         = 80030105h
STG_E_SHAREREQUIRED                  = 80030106h
STG_E_NOTFILEBASEDSTORAGE            = 80030107h
STG_E_EXTANTMARSHALLINGS             = 80030108h
STG_S_CONVERTED                      = 30200h
RPC_E_CALL_REJECTED                  = 80010001h
RPC_E_CALL_CANCELED                  = 80010002h
RPC_E_CANTPOST_INSENDCALL            = 80010003h
RPC_E_CANTCALLOUT_INASYNCCALL        = 80010004h
RPC_E_CANTCALLOUT_INEXTERNALCALL     = 80010005h
RPC_E_CONNECTION_TERMINATED          = 80010006h
RPC_E_SERVER_DIED                    = 80010007h
RPC_E_CLIENT_DIED                    = 80010008h
RPC_E_INVALID_DATAPACKET             = 80010009h
RPC_E_CANTTRANSMIT_CALL              = 8001000Ah
RPC_E_CLIENT_CANTMARSHAL_DATA        = 8001000Bh
RPC_E_CLIENT_CANTUNMARSHAL_DATA      = 8001000Ch
RPC_E_SERVER_CANTMARSHAL_DATA        = 8001000Dh
RPC_E_SERVER_CANTUNMARSHAL_DATA      = 8001000Eh
RPC_E_INVALID_DATA                   = 8001000Fh
RPC_E_INVALID_PARAMETER              = 80010010h
RPC_E_CANTCALLOUT_AGAIN              = 80010011h
RPC_E_SERVER_DIED_DNE                = 80010012h
RPC_E_SYS_CALL_FAILED                = 80010100h
RPC_E_OUT_OF_RESOURCES               = 80010101h
RPC_E_ATTEMPTED_MULTITHREAD          = 80010102h
RPC_E_NOT_REGISTERED                 = 80010103h
RPC_E_FAULT                          = 80010104h
RPC_E_SERVERFAULT                    = 80010105h
RPC_E_CHANGED_MODE                   = 80010106h
RPC_E_INVALIDMETHOD                  = 80010107h
RPC_E_DISCONNECTED                   = 80010108h
RPC_E_RETRY                          = 80010109h
RPC_E_SERVERCALL_RETRYLATER          = 8001010Ah
RPC_E_SERVERCALL_REJECTED            = 8001010Bh
RPC_E_INVALID_CALLDATA               = 8001010Ch
RPC_E_CANTCALLOUT_ININPUTSYNCCALL    = 8001010Dh
RPC_E_WRONG_THREAD                   = 8001010Eh
RPC_E_THREAD_NOT_INIT                = 8001010Fh
RPC_E_UNEXPECTED                     = 8001FFFFh
ERROR_BAD_USERNAME                   = 2202
ERROR_NOT_CONNECTED                  = 2250
ERROR_OPEN_FILES                     = 2401
ERROR_DEVICE_IN_USE                  = 2404
ERROR_BAD_DEVICE                     = 1200
ERROR_CONNECTION_UNAVAIL             = 1201
ERROR_DEVICE_ALREADY_REMEMBERED      = 1202
ERROR_NO_NET_OR_BAD_PATH             = 1203
ERROR_BAD_PROVIDER                   = 1204
ERROR_CANNOT_OPEN_PROFILE            = 1205
ERROR_BAD_PROFILE                    = 1206
ERROR_NOT_CONTAINER                  = 1207
ERROR_EXTENDED_ERROR                 = 1208
ERROR_INVALID_GROUPNAME              = 1209
ERROR_INVALID_COMPUTERNAME           = 1210
ERROR_INVALID_EVENTNAME              = 1211
ERROR_INVALID_DOMAINNAME             = 1212
ERROR_INVALID_SERVICENAME            = 1213
ERROR_INVALID_NETNAME                = 1214
ERROR_INVALID_SHARENAME              = 1215
ERROR_INVALID_PASSWORDNAME           = 1216
ERROR_INVALID_MESSAGENAME            = 1217
ERROR_INVALID_MESSAGEDEST            = 1218
ERROR_SESSION_CREDENTIAL_CONFLICT    = 1219
ERROR_REMOTE_SESSION_LIMIT_EXCEEDED  = 1220
ERROR_DUP_DOMAINNAME                 = 1221
ERROR_NO_NETWORK                     = 1222
ERROR_NOT_ALL_ASSIGNED               = 1300
ERROR_SOME_NOT_MAPPED                = 1301
ERROR_NO_QUOTAS_FOR_ACCOUNT          = 1302
ERROR_LOCAL_USER_SESSION_KEY         = 1303
ERROR_NULL_LM_PASSWORD               = 1304
ERROR_UNKNOWN_REVISION               = 1305
ERROR_REVISION_MISMATCH              = 1306
ERROR_INVALID_OWNER                  = 1307
ERROR_INVALID_PRIMARY_GROUP          = 1308
ERROR_NO_IMPERSONATION_TOKEN         = 1309
ERROR_CANT_DISABLE_MANDATORY         = 1310
ERROR_NO_LOGON_SERVERS               = 1311
ERROR_NO_SUCH_LOGON_SESSION          = 1312
ERROR_NO_SUCH_PRIVILEGE              = 1313
ERROR_PRIVILEGE_NOT_HELD             = 1314
ERROR_INVALID_ACCOUNT_NAME           = 1315
ERROR_USER_EXISTS                    = 1316
ERROR_NO_SUCH_USER                   = 1317
ERROR_GROUP_EXISTS                   = 1318
ERROR_NO_SUCH_GROUP                  = 1319
ERROR_MEMBER_IN_GROUP                = 1320
ERROR_MEMBER_NOT_IN_GROUP            = 1321
ERROR_LAST_ADMIN                     = 1322
ERROR_WRONG_PASSWORD                 = 1323
ERROR_ILL_FORMED_PASSWORD            = 1324
ERROR_PASSWORD_RESTRICTION           = 1325
ERROR_LOGON_FAILURE                  = 1326
ERROR_ACCOUNT_RESTRICTION            = 1327
ERROR_INVALID_LOGON_HOURS            = 1328
ERROR_INVALID_WORKSTATION            = 1329
ERROR_PASSWORD_EXPIRED               = 1330
ERROR_ACCOUNT_DISABLED               = 1331
ERROR_NONE_MAPPED                    = 1332
ERROR_TOO_MANY_LUIDS_REQUESTED       = 1333
ERROR_LUIDS_EXHAUSTED                = 1334
ERROR_INVALID_SUB_AUTHORITY          = 1335
ERROR_INVALID_ACL                    = 1336
ERROR_INVALID_SID                    = 1337
ERROR_INVALID_SECURITY_DESCR         = 1338
ERROR_BAD_INHERITANCE_ACL            = 1340
ERROR_SERVER_DISABLED                = 1341
ERROR_SERVER_NOT_DISABLED            = 1342
ERROR_INVALID_ID_AUTHORITY           = 1343
ERROR_ALLOTTED_SPACE_EXCEEDED        = 1344
ERROR_INVALID_GROUP_ATTRIBUTES       = 1345
ERROR_BAD_IMPERSONATION_LEVEL        = 1346
ERROR_CANT_OPEN_ANONYMOUS            = 1347
ERROR_BAD_VALIDATION_CLASS           = 1348
ERROR_BAD_TOKEN_TYPE                 = 1349
ERROR_NO_SECURITY_ON_OBJECT          = 1350
ERROR_CANT_ACCESS_DOMAIN_INFO        = 1351
ERROR_INVALID_SERVER_STATE           = 1352
ERROR_INVALID_DOMAIN_STATE           = 1353
ERROR_INVALID_DOMAIN_ROLE            = 1354
ERROR_NO_SUCH_DOMAIN                 = 1355
ERROR_DOMAIN_EXISTS                  = 1356
ERROR_DOMAIN_LIMIT_EXCEEDED          = 1357
ERROR_INTERNAL_DB_CORRUPTION         = 1358
ERROR_INTERNAL_ERROR                 = 1359
ERROR_GENERIC_NOT_MAPPED             = 1360
ERROR_BAD_DESCRIPTOR_FORMAT          = 1361
ERROR_NOT_LOGON_PROCESS              = 1362
ERROR_LOGON_SESSION_EXISTS           = 1363
ERROR_NO_SUCH_PACKAGE                = 1364
ERROR_BAD_LOGON_SESSION_STATE        = 1365
ERROR_LOGON_SESSION_COLLISION        = 1366
ERROR_INVALID_LOGON_TYPE             = 1367
ERROR_CANNOT_IMPERSONATE             = 1368
ERROR_RXACT_INVALID_STATE            = 1369
ERROR_RXACT_COMMIT_FAILURE           = 1370
ERROR_SPECIAL_ACCOUNT                = 1371
ERROR_SPECIAL_GROUP                  = 1372
ERROR_SPECIAL_USER                   = 1373
ERROR_MEMBERS_PRIMARY_GROUP          = 1374
ERROR_TOKEN_ALREADY_IN_USE           = 1375
ERROR_NO_SUCH_ALIAS                  = 1376
ERROR_MEMBER_NOT_IN_ALIAS            = 1377
ERROR_MEMBER_IN_ALIAS                = 1378
ERROR_ALIAS_EXISTS                   = 1379
ERROR_LOGON_NOT_GRANTED              = 1380
ERROR_TOO_MANY_SECRETS               = 1381
ERROR_SECRET_TOO_LONG                = 1382
ERROR_INTERNAL_DB_ERROR              = 1383
ERROR_TOO_MANY_CONTEXT_IDS           = 1384
ERROR_LOGON_TYPE_NOT_GRANTED         = 1385
ERROR_NT_CROSS_ENCRYPTION_REQUIRED   = 1386
ERROR_NO_SUCH_MEMBER                 = 1387
ERROR_INVALID_MEMBER                 = 1388
ERROR_TOO_MANY_SIDS                  = 1389
ERROR_LM_CROSS_ENCRYPTION_REQUIRED   = 1390
ERROR_NO_INHERITANCE                 = 1391
ERROR_FILE_CORRUPT                   = 1392
ERROR_DISK_CORRUPT                   = 1393
ERROR_NO_USER_SESSION_KEY            = 1394
ERROR_INVALID_WINDOW_HANDLE          = 1400
ERROR_INVALID_MENU_HANDLE            = 1401
ERROR_INVALID_CURSOR_HANDLE          = 1402
ERROR_INVALID_ACCEL_HANDLE           = 1403
ERROR_INVALID_HOOK_HANDLE            = 1404
ERROR_INVALID_DWP_HANDLE             = 1405
ERROR_TLW_WITH_WSCHILD               = 1406
ERROR_CANNOT_FIND_WND_CLASS          = 1407
ERROR_WINDOW_OF_OTHER_THREAD         = 1408
ERROR_HOTKEY_ALREADY_REGISTERED      = 1409
ERROR_CLASS_ALREADY_EXISTS           = 1410
ERROR_CLASS_DOES_NOT_EXIST           = 1411
ERROR_CLASS_HAS_WINDOWS              = 1412
ERROR_INVALID_INDEX                  = 1413
ERROR_INVALID_ICON_HANDLE            = 1414
ERROR_PRIVATE_DIALOG_INDEX           = 1415
ERROR_LISTBOX_ID_NOT_FOUND           = 1416
ERROR_NO_WILDCARD_CHARACTERS         = 1417
ERROR_CLIPBOARD_NOT_OPEN             = 1418
ERROR_HOTKEY_NOT_REGISTERED          = 1419
ERROR_WINDOW_NOT_DIALOG              = 1420
ERROR_CONTROL_ID_NOT_FOUND           = 1421
ERROR_INVALID_COMBOBOX_MESSAGE       = 1422
ERROR_WINDOW_NOT_COMBOBOX            = 1423
ERROR_INVALID_EDIT_HEIGHT            = 1424
ERROR_DC_NOT_FOUND                   = 1425
ERROR_INVALID_HOOK_FILTER            = 1426
ERROR_INVALID_FILTER_PROC            = 1427
ERROR_HOOK_NEEDS_HMOD                = 1428
ERROR_PUBLIC_ONLY_HOOK               = 1429
ERROR_JOURNAL_HOOK_SET               = 1430
ERROR_HOOK_NOT_INSTALLED             = 1431
ERROR_INVALID_LB_MESSAGE             = 1432
ERROR_SETCOUNT_ON_BAD_LB             = 1433
ERROR_LB_WITHOUT_TABSTOPS            = 1434
ERROR_DESTROY_OBJECT_OF_OTHER_THREAD = 1435
ERROR_CHILD_WINDOW_MENU              = 1436
ERROR_NO_SYSTEM_MENU                 = 1437
ERROR_INVALID_MSGBOX_STYLE           = 1438
ERROR_INVALID_SPI_VALUE              = 1439
ERROR_SCREEN_ALREADY_LOCKED          = 1440
ERROR_HWNDS_HAVE_DIFF_PARENT         = 1441
ERROR_NOT_CHILD_WINDOW               = 1442
ERROR_INVALID_GW_COMMAND             = 1443
ERROR_INVALID_THREAD_ID              = 1444
ERROR_NON_MDICHILD_WINDOW            = 1445
ERROR_POPUP_ALREADY_ACTIVE           = 1446
ERROR_NO_SCROLLBARS                  = 1447
ERROR_INVALID_SCROLLBAR_RANGE        = 1448
ERROR_INVALID_SHOWWIN_COMMAND        = 1449
ERROR_EVENTLOG_FILE_CORRUPT          = 1500
ERROR_EVENTLOG_CANT_START            = 1501
ERROR_LOG_FILE_FULL                  = 1502
ERROR_EVENTLOG_FILE_CHANGED          = 1503
RPC_S_INVALID_STRING_BINDING         = 1700
RPC_S_WRONG_KIND_OF_BINDING          = 1701
RPC_S_INVALID_BINDING                = 1702
RPC_S_PROTSEQ_NOT_SUPPORTED          = 1703
RPC_S_INVALID_RPC_PROTSEQ            = 1704
RPC_S_INVALID_STRING_UUID            = 1705
RPC_S_INVALID_ENDPOINT_FORMAT        = 1706
RPC_S_INVALID_NET_ADDR               = 1707
RPC_S_NO_ENDPOINT_FOUND              = 1708
RPC_S_INVALID_TIMEOUT                = 1709
RPC_S_OBJECT_NOT_FOUND               = 1710
RPC_S_ALREADY_REGISTERED             = 1711
RPC_S_TYPE_ALREADY_REGISTERED        = 1712
RPC_S_ALREADY_LISTENING              = 1713
RPC_S_NO_PROTSEQS_REGISTERED         = 1714
RPC_S_NOT_LISTENING                  = 1715
RPC_S_UNKNOWN_MGR_TYPE               = 1716
RPC_S_UNKNOWN_IF                     = 1717
RPC_S_NO_BINDINGS                    = 1718
RPC_S_NO_PROTSEQS                    = 1719
RPC_S_CANT_CREATE_ENDPOINT           = 1720
RPC_S_OUT_OF_RESOURCES               = 1721
RPC_S_SERVER_UNAVAILABLE             = 1722
RPC_S_SERVER_TOO_BUSY                = 1723
RPC_S_INVALID_NETWORK_OPTIONS        = 1724
RPC_S_NO_CALL_ACTIVE                 = 1725
RPC_S_CALL_FAILED                    = 1726
RPC_S_CALL_FAILED_DNE                = 1727
RPC_S_PROTOCOL_ERROR                 = 1728
RPC_S_UNSUPPORTED_TRANS_SYN          = 1730
RPC_S_UNSUPPORTED_TYPE               = 1732
RPC_S_INVALID_TAG                    = 1733
RPC_S_INVALID_BOUND                  = 1734
RPC_S_NO_ENTRY_NAME                  = 1735
RPC_S_INVALID_NAME_SYNTAX            = 1736
RPC_S_UNSUPPORTED_NAME_SYNTAX        = 1737
RPC_S_UUID_NO_ADDRESS                = 1739
RPC_S_DUPLICATE_ENDPOINT             = 1740
RPC_S_UNKNOWN_AUTHN_TYPE             = 1741
RPC_S_MAX_CALLS_TOO_SMALL            = 1742
RPC_S_STRING_TOO_LONG                = 1743
RPC_S_PROTSEQ_NOT_FOUND              = 1744
RPC_S_PROCNUM_OUT_OF_RANGE           = 1745
RPC_S_BINDING_HAS_NO_AUTH            = 1746
RPC_S_UNKNOWN_AUTHN_SERVICE          = 1747
RPC_S_UNKNOWN_AUTHN_LEVEL            = 1748
RPC_S_INVALID_AUTH_IDENTITY          = 1749
RPC_S_UNKNOWN_AUTHZ_SERVICE          = 1750
EPT_S_INVALID_ENTRY                  = 1751
EPT_S_CANT_PERFORM_OP                = 1752
EPT_S_NOT_REGISTERED                 = 1753
RPC_S_NOTHING_TO_EXPORT              = 1754
RPC_S_INCOMPLETE_NAME                = 1755
RPC_S_INVALID_VERS_OPTION            = 1756
RPC_S_NO_MORE_MEMBERS                = 1757
RPC_S_NOT_ALL_OBJS_UNEXPORTED        = 1758
RPC_S_INTERFACE_NOT_FOUND            = 1759
RPC_S_ENTRY_ALREADY_EXISTS           = 1760
RPC_S_ENTRY_NOT_FOUND                = 1761
RPC_S_NAME_SERVICE_UNAVAILABLE       = 1762
RPC_S_INVALID_NAF_ID                 = 1763
RPC_S_CANNOT_SUPPORT                 = 1764
RPC_S_NO_CONTEXT_AVAILABLE           = 1765
RPC_S_INTERNAL_ERROR                 = 1766
RPC_S_ZERO_DIVIDE                    = 1767
RPC_S_ADDRESS_ERROR                  = 1768
RPC_S_FP_DIV_ZERO                    = 1769
RPC_S_FP_UNDERFLOW                   = 1770
RPC_S_FP_OVERFLOW                    = 1771
RPC_X_NO_MORE_ENTRIES                = 1772
RPC_X_SS_CHAR_TRANS_OPEN_FAIL        = 1773
RPC_X_SS_CHAR_TRANS_SHORT_FILE       = 1774
RPC_X_SS_IN_NULL_CONTEXT             = 1775
RPC_X_SS_CONTEXT_DAMAGED             = 1777
RPC_X_SS_HANDLES_MISMATCH            = 1778
RPC_X_SS_CANNOT_GET_CALL_HANDLE      = 1779
RPC_X_NULL_REF_POINTER               = 1780
RPC_X_ENUM_VALUE_OUT_OF_RANGE        = 1781
RPC_X_BYTE_COUNT_TOO_SMALL           = 1782
RPC_X_BAD_STUB_DATA                  = 1783
ERROR_INVALID_USER_BUFFER            = 1784
ERROR_UNRECOGNIZED_MEDIA             = 1785
ERROR_NO_TRUST_LSA_SECRET            = 1786
ERROR_NO_TRUST_SAM_ACCOUNT           = 1787
ERROR_TRUSTED_DOMAIN_FAILURE         = 1788
ERROR_TRUSTED_RELATIONSHIP_FAILURE   = 1789
ERROR_TRUST_FAILURE                  = 1790
RPC_S_CALL_IN_PROGRESS               = 1791
ERROR_NETLOGON_NOT_STARTED           = 1792
ERROR_ACCOUNT_EXPIRED                = 1793
ERROR_REDIRECTOR_HAS_OPEN_HANDLES    = 1794
ERROR_PRINTER_DRIVER_ALREADY_INSTALLED               = 1795
ERROR_UNKNOWN_PORT                   = 1796
ERROR_UNKNOWN_PRINTER_DRIVER         = 1797
ERROR_UNKNOWN_PRINTPROCESSOR         = 1798
ERROR_INVALID_SEPARATOR_FILE         = 1799
ERROR_INVALID_PRIORITY               = 1800
ERROR_INVALID_PRINTER_NAME           = 1801
ERROR_PRINTER_ALREADY_EXISTS         = 1802
ERROR_INVALID_PRINTER_COMMAND        = 1803
ERROR_INVALID_DATATYPE               = 1804
ERROR_INVALID_ENVIRONMENT            = 1805
RPC_S_NO_MORE_BINDINGS               = 1806
ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT              = 1807
ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT              = 1808
ERROR_NOLOGON_SERVER_TRUST_ACCOUNT   = 1809
ERROR_DOMAIN_TRUST_INCONSISTENT      = 1810
ERROR_SERVER_HAS_OPEN_HANDLES        = 1811
ERROR_RESOURCE_DATA_NOT_FOUND        = 1812
ERROR_RESOURCE_TYPE_NOT_FOUND        = 1813
ERROR_RESOURCE_NAME_NOT_FOUND        = 1814
ERROR_RESOURCE_LANG_NOT_FOUND        = 1815
ERROR_NOT_ENOUGH_QUOTA               = 1816
RPC_S_GROUP_MEMBER_NOT_FOUND         = 1898
EPT_S_CANT_CREATE                    = 1899
RPC_S_INVALID_OBJECT                 = 1900
ERROR_INVALID_TIME                   = 1901
ERROR_INVALID_FORM_NAME              = 1902
ERROR_INVALID_FORM_SIZE              = 1903
ERROR_ALREADY_WAITING                = 1904
ERROR_PRINTER_DELETED                = 1905
ERROR_INVALID_PRINTER_STATE          = 1906
ERROR_NO_BROWSER_SERVERS_FOUND       = 6118
MAXPNAMELEN                          = 32
MAXERRORLENGTH                       = 128
TIME_MS                              = 1h
TIME_SAMPLES                         = 2h
TIME_BYTES                           = 4h
TIME_SMPTE                           = 8h
TIME_MIDI                            = 10h
TIME_TICKS                       = 20h
MM_JOY1MOVE                          = 3A0h
MM_JOY2MOVE                          = 3A1h
MM_JOY1ZMOVE                         = 3A2h
MM_JOY2ZMOVE                         = 3A3h
MM_JOY1BUTTONDOWN                    = 3B5h
MM_JOY2BUTTONDOWN                    = 3B6h
MM_JOY1BUTTONUP                      = 3B7h
MM_JOY2BUTTONUP                      = 3B8h
MM_MCINOTIFY                         = 3B9h
MM_MCISYSTEM_STRING                  = 3CAh
MM_WOM_OPEN                          = 3BBh
MM_WOM_CLOSE                         = 3BCh
MM_WOM_DONE                          = 3BDh
MM_WIM_OPEN                          = 3BEh
MM_WIM_CLOSE                         = 3BFh
MM_WIM_DATA                          = 3C0h
MM_MIM_OPEN                          = 3C1h
MM_MIM_CLOSE                         = 3C2h
MM_MIM_DATA                          = 3C3h
MM_MIM_LONGDATA                      = 3C4h
MM_MIM_ERROR                         = 3C5h
MM_MIM_LONGERROR                     = 3C6h
MM_MOM_OPEN                          = 3C7h
MM_MOM_CLOSE                         = 3C8h
MM_MOM_DONE                          = 3C9h
MMSYSERR_BASE                        = 0
WAVERR_BASE                          = 32
MIDIERR_BASE                         = 64
TIMERR_BASE                          = 96
JOYERR_BASE                          = 160
MCIERR_BASE                          = 256
MIXERR_BASE                      = 1024
MCI_STRING_OFFSET                    = 512
MCI_VD_OFFSET                        = 1024
MCI_CD_OFFSET                        = 1088
MCI_WAVE_OFFSET                      = 1152
MCI_SEQ_OFFSET                       = 1216
MMSYSERR_NOERROR                     = 0
MMSYSERR_ERROR                       = MMSYSERR_BASE + 1
MMSYSERR_BADDEVICEID                 = MMSYSERR_BASE + 2
MMSYSERR_NOTENABLED                  = MMSYSERR_BASE + 3
MMSYSERR_ALLOCATED                   = MMSYSERR_BASE + 4
MMSYSERR_INVALHANDLE                 = MMSYSERR_BASE + 5
MMSYSERR_NODRIVER                    = MMSYSERR_BASE + 6
MMSYSERR_NOMEM                       = MMSYSERR_BASE + 7
MMSYSERR_NOTSUPPORTED                = MMSYSERR_BASE + 8
MMSYSERR_BADERRNUM                   = MMSYSERR_BASE + 9
MMSYSERR_INVALFLAG                   = MMSYSERR_BASE + 10
MMSYSERR_INVALPARAM                  = MMSYSERR_BASE + 11
MMSYSERR_HANDLEBUSY                  = MMSYSERR_BASE + 12
MMSYSERR_INVALIDALIAS                = MMSYSERR_BASE + 13
MMSYSERR_LASTERROR                   = MMSYSERR_BASE + 13
MM_MOM_POSITIONCB                    = 3CAh
MM_MCISIGNAL                         = 3CBh
MM_MIM_MOREDATA                      = 3CCh
MIDICAPS_STREAM                      = 8h
MEVT_F_SHORT                         = 0h
MEVT_F_LONG                          = 80000000h
MEVT_F_CALLBACK                      = 40000000h
MIDISTRM_ERROR                       = -2
MIDIPROP_SET                         = 80000000h
MIDIPROP_GET                         = 40000000h
MIDIPROP_TIMEDIV                     = 1h
MIDIPROP_TEMPO                       = 2h
MIXER_SHORT_NAME_CHARS               = 16
MIXER_LONG_NAME_CHARS                = 64
MIXERR_INVALLINE                     = MIXERR_BASE + 0
MIXERR_INVALCONTROL                  = MIXERR_BASE + 1
MIXERR_INVALVALUE                    = MIXERR_BASE + 2
MIXERR_LASTERROR                     = MIXERR_BASE + 2
MIXER_OBJECTF_HANDLE                 = 80000000h
MIXER_OBJECTF_MIXER                  = 0h
MIXER_OBJECTF_HMIXER                 = MIXER_OBJECTF_HANDLE or MIXER_OBJECTF_MIXER
MIXER_OBJECTF_WAVEOUT                = 10000000h
MIXER_OBJECTF_HWAVEOUT               = MIXER_OBJECTF_HANDLE or MIXER_OBJECTF_WAVEOUT
MIXER_OBJECTF_WAVEIN                 = 20000000h
MIXER_OBJECTF_HWAVEIN                = MIXER_OBJECTF_HANDLE or MIXER_OBJECTF_WAVEIN
MIXER_OBJECTF_MIDIOUT                = 30000000h
MIXER_OBJECTF_HMIDIOUT               = MIXER_OBJECTF_HANDLE or MIXER_OBJECTF_MIDIOUT
MIXER_OBJECTF_MIDIIN                 = 40000000h
MIXER_OBJECTF_HMIDIIN                = MIXER_OBJECTF_HANDLE or MIXER_OBJECTF_MIDIIN
MIXER_OBJECTF_AUX                    = 50000000h
MIXERLINE_LINEF_ACTIVE               = 1h
MIXERLINE_LINEF_DISCONNECTED         = 8000h
MIXERLINE_LINEF_SOURCE               = 80000000h
MIXERLINE_COMPONENTTYPE_DST_FIRST    = 0h
MIXERLINE_COMPONENTTYPE_DST_UNDEFINED                = MIXERLINE_COMPONENTTYPE_DST_FIRST + 0
MIXERLINE_COMPONENTTYPE_DST_DIGITAL  = MIXERLINE_COMPONENTTYPE_DST_FIRST + 1
MIXERLINE_COMPONENTTYPE_DST_LINE     = MIXERLINE_COMPONENTTYPE_DST_FIRST + 2
MIXERLINE_COMPONENTTYPE_DST_MONITOR  = MIXERLINE_COMPONENTTYPE_DST_FIRST + 3
MIXERLINE_COMPONENTTYPE_DST_SPEAKERS = MIXERLINE_COMPONENTTYPE_DST_FIRST + 4
MIXERLINE_COMPONENTTYPE_DST_HEADPHONES               = MIXERLINE_COMPONENTTYPE_DST_FIRST + 5
MIXERLINE_COMPONENTTYPE_DST_TELEPHONE                = MIXERLINE_COMPONENTTYPE_DST_FIRST + 6
MIXERLINE_COMPONENTTYPE_DST_WAVEIN   = MIXERLINE_COMPONENTTYPE_DST_FIRST + 7
MIXERLINE_COMPONENTTYPE_DST_VOICEIN  = MIXERLINE_COMPONENTTYPE_DST_FIRST + 8
MIXERLINE_COMPONENTTYPE_DST_LAST     = MIXERLINE_COMPONENTTYPE_DST_FIRST + 8
MIXERLINE_COMPONENTTYPE_SRC_FIRST    = 1000h
MIXERLINE_COMPONENTTYPE_SRC_UNDEFINED                = MIXERLINE_COMPONENTTYPE_SRC_FIRST + 0
MIXERLINE_COMPONENTTYPE_SRC_DIGITAL  = MIXERLINE_COMPONENTTYPE_SRC_FIRST + 1
MIXERLINE_COMPONENTTYPE_SRC_LINE     = MIXERLINE_COMPONENTTYPE_SRC_FIRST + 2
MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE               = MIXERLINE_COMPONENTTYPE_SRC_FIRST + 3
MIXERLINE_COMPONENTTYPE_SRC_SYNTHESIZER              = MIXERLINE_COMPONENTTYPE_SRC_FIRST + 4
MIXERLINE_COMPONENTTYPE_SRC_COMPACTDISC              = MIXERLINE_COMPONENTTYPE_SRC_FIRST + 5
MIXERLINE_COMPONENTTYPE_SRC_TELEPHONE                = MIXERLINE_COMPONENTTYPE_SRC_FIRST + 6
MIXERLINE_COMPONENTTYPE_SRC_PCSPEAKER                = MIXERLINE_COMPONENTTYPE_SRC_FIRST + 7
MIXERLINE_COMPONENTTYPE_SRC_WAVEOUT  = MIXERLINE_COMPONENTTYPE_SRC_FIRST + 8
MIXERLINE_COMPONENTTYPE_SRC_AUXILIARY                = MIXERLINE_COMPONENTTYPE_SRC_FIRST + 9
MIXERLINE_COMPONENTTYPE_SRC_ANALOG   = MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10
MIXERLINE_COMPONENTTYPE_SRC_LAST     = MIXERLINE_COMPONENTTYPE_SRC_FIRST + 10
MIXERLINE_TARGETTYPE_UNDEFINED       = 0
MIXERLINE_TARGETTYPE_WAVEOUT         = 1
MIXERLINE_TARGETTYPE_WAVEIN          = 2
MIXERLINE_TARGETTYPE_MIDIOUT         = 3
MIXERLINE_TARGETTYPE_MIDIIN          = 4
MIXERLINE_TARGETTYPE_AUX             = 5
MIXER_GETLINEINFOF_DESTINATION       = 0h
MIXER_GETLINEINFOF_SOURCE            = 1h
MIXER_GETLINEINFOF_LINEID            = 2h
MIXER_GETLINEINFOF_COMPONENTTYPE     = 3h
MIXER_GETLINEINFOF_TARGETTYPE        = 4h
MIXER_GETLINEINFOF_QUERYMASK         = 0Fh
MIXERCONTROL_CONTROLF_UNIFORM        = 1h
MIXERCONTROL_CONTROLF_MULTIPLE       = 2h
MIXERCONTROL_CONTROLF_DISABLED       = 80000000h
MIXERCONTROL_CT_CLASS_MASK           = 0F0000000h
MIXERCONTROL_CT_CLASS_CUSTOM         = 0h
MIXERCONTROL_CT_CLASS_METER          = 10000000h
MIXERCONTROL_CT_CLASS_SWITCH         = 20000000h
MIXERCONTROL_CT_CLASS_NUMBER         = 30000000h
MIXERCONTROL_CT_CLASS_SLIDER         = 40000000h
MIXERCONTROL_CT_CLASS_FADER          = 50000000h
MIXERCONTROL_CT_CLASS_TIME           = 60000000h
MIXERCONTROL_CT_CLASS_LIST           = 70000000h
MIXERCONTROL_CT_SUBCLASS_MASK        = 0F000000h
MIXERCONTROL_CT_SC_SWITCH_BOOLEAN    = 0h
MIXERCONTROL_CT_SC_SWITCH_BUTTON     = 1000000h
MIXERCONTROL_CT_SC_METER_POLLED      = 0h
MIXERCONTROL_CT_SC_TIME_MICROSECS    = 0h
MIXERCONTROL_CT_SC_TIME_MILLISECS    = 1000000h
MIXERCONTROL_CT_SC_LIST_SINGLE       = 0h
MIXERCONTROL_CT_SC_LIST_MULTIPLE     = 1000000h
MIXERCONTROL_CT_UNITS_MASK           = 0FF0000h
MIXERCONTROL_CT_UNITS_CUSTOM         = 0h
MIXERCONTROL_CT_UNITS_BOOLEAN        = 10000h
MIXERCONTROL_CT_UNITS_SIGNED         = 20000h
MIXERCONTROL_CT_UNITS_UNSIGNED       = 30000h
MIXERCONTROL_CT_UNITS_DECIBELS       = 40000h
MIXERCONTROL_CT_UNITS_PERCENT        = 50000h
MIXERCONTROL_CONTROLTYPE_CUSTOM      = MIXERCONTROL_CT_CLASS_CUSTOM or MIXERCONTROL_CT_UNITS_CUSTOM
MIXERCONTROL_CONTROLTYPE_BOOLEANMETER                = MIXERCONTROL_CT_CLASS_METER or MIXERCONTROL_CT_SC_METER_POLLED or MIXERCONTROL_CT_UNITS_BOOLEAN
MIXERCONTROL_CONTROLTYPE_SIGNEDMETER = MIXERCONTROL_CT_CLASS_METER or MIXERCONTROL_CT_SC_METER_POLLED or MIXERCONTROL_CT_UNITS_SIGNED
MIXERCONTROL_CONTROLTYPE_PEAKMETER   = MIXERCONTROL_CONTROLTYPE_SIGNEDMETER + 1
MIXERCONTROL_CONTROLTYPE_UNSIGNEDMETER               = MIXERCONTROL_CT_CLASS_METER or MIXERCONTROL_CT_SC_METER_POLLED or MIXERCONTROL_CT_UNITS_UNSIGNED
MIXERCONTROL_CONTROLTYPE_BOOLEAN     = MIXERCONTROL_CT_CLASS_SWITCH or MIXERCONTROL_CT_SC_SWITCH_BOOLEAN or MIXERCONTROL_CT_UNITS_BOOLEAN
MIXERCONTROL_CONTROLTYPE_ONOFF       = MIXERCONTROL_CONTROLTYPE_BOOLEAN + 1
MIXERCONTROL_CONTROLTYPE_MUTE        = MIXERCONTROL_CONTROLTYPE_BOOLEAN + 2
MIXERCONTROL_CONTROLTYPE_MONO        = MIXERCONTROL_CONTROLTYPE_BOOLEAN + 3
MIXERCONTROL_CONTROLTYPE_LOUDNESS    = MIXERCONTROL_CONTROLTYPE_BOOLEAN + 4
MIXERCONTROL_CONTROLTYPE_STEREOENH   = MIXERCONTROL_CONTROLTYPE_BOOLEAN + 5
MIXERCONTROL_CONTROLTYPE_BUTTON      = MIXERCONTROL_CT_CLASS_SWITCH or MIXERCONTROL_CT_SC_SWITCH_BUTTON or MIXERCONTROL_CT_UNITS_BOOLEAN
MIXERCONTROL_CONTROLTYPE_DECIBELS    = MIXERCONTROL_CT_CLASS_NUMBER or MIXERCONTROL_CT_UNITS_DECIBELS
MIXERCONTROL_CONTROLTYPE_SIGNED      = MIXERCONTROL_CT_CLASS_NUMBER or MIXERCONTROL_CT_UNITS_SIGNED
MIXERCONTROL_CONTROLTYPE_UNSIGNED    = MIXERCONTROL_CT_CLASS_NUMBER or MIXERCONTROL_CT_UNITS_UNSIGNED
MIXERCONTROL_CONTROLTYPE_PERCENT     = MIXERCONTROL_CT_CLASS_NUMBER or MIXERCONTROL_CT_UNITS_PERCENT
MIXERCONTROL_CONTROLTYPE_SLIDER      = MIXERCONTROL_CT_CLASS_SLIDER or MIXERCONTROL_CT_UNITS_SIGNED
MIXERCONTROL_CONTROLTYPE_PAN         = MIXERCONTROL_CONTROLTYPE_SLIDER + 1
MIXERCONTROL_CONTROLTYPE_QSOUNDPAN   = MIXERCONTROL_CONTROLTYPE_SLIDER + 2
MIXERCONTROL_CONTROLTYPE_FADER       = MIXERCONTROL_CT_CLASS_FADER or MIXERCONTROL_CT_UNITS_UNSIGNED
MIXERCONTROL_CONTROLTYPE_VOLUME      = MIXERCONTROL_CONTROLTYPE_FADER + 1
MIXERCONTROL_CONTROLTYPE_BASS        = MIXERCONTROL_CONTROLTYPE_FADER + 2
MIXERCONTROL_CONTROLTYPE_TREBLE      = MIXERCONTROL_CONTROLTYPE_FADER + 3
MIXERCONTROL_CONTROLTYPE_EQUALIZER   = MIXERCONTROL_CONTROLTYPE_FADER + 4
MIXERCONTROL_CONTROLTYPE_SINGLESELECT                = MIXERCONTROL_CT_CLASS_LIST or MIXERCONTROL_CT_SC_LIST_SINGLE or MIXERCONTROL_CT_UNITS_BOOLEAN
MIXERCONTROL_CONTROLTYPE_MUX         = MIXERCONTROL_CONTROLTYPE_SINGLESELECT + 1
MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT              = MIXERCONTROL_CT_CLASS_LIST or MIXERCONTROL_CT_SC_LIST_MULTIPLE or MIXERCONTROL_CT_UNITS_BOOLEAN
MIXERCONTROL_CONTROLTYPE_MIXER       = MIXERCONTROL_CONTROLTYPE_MULTIPLESELECT + 1
MIXERCONTROL_CONTROLTYPE_MICROTIME   = MIXERCONTROL_CT_CLASS_TIME or MIXERCONTROL_CT_SC_TIME_MICROSECS or MIXERCONTROL_CT_UNITS_UNSIGNED
MIXERCONTROL_CONTROLTYPE_MILLITIME   = MIXERCONTROL_CT_CLASS_TIME or MIXERCONTROL_CT_SC_TIME_MILLISECS or MIXERCONTROL_CT_UNITS_UNSIGNED
MIXER_GETLINECONTROLSF_ALL           = 0h
MIXER_GETLINECONTROLSF_ONEBYID       = 1h
MIXER_GETLINECONTROLSF_ONEBYTYPE     = 2h
MIXER_GETLINECONTROLSF_QUERYMASK     = 0Fh
MIXER_GETCONTROLDETAILSF_VALUE       = 0h
MIXER_GETCONTROLDETAILSF_LISTTEXT    = 1h
MIXER_GETCONTROLDETAILSF_QUERYMASK   = 0Fh
MIXER_SETCONTROLDETAILSF_VALUE       = 0h
MIXER_SETCONTROLDETAILSF_CUSTOM      = 1h
MIXER_SETCONTROLDETAILSF_QUERYMASK   = 0Fh
JOY_BUTTON5                          = 10h
JOY_BUTTON6                          = 20h
JOY_BUTTON7                          = 40h
JOY_BUTTON8                          = 80h
JOY_BUTTON9                          = 100h
JOY_BUTTON10                         = 200h
JOY_BUTTON11                         = 400h
JOY_BUTTON12                         = 800h
JOY_BUTTON13                         = 1000h
JOY_BUTTON14                         = 2000h
JOY_BUTTON15                         = 4000h
JOY_BUTTON16                         = 8000h
JOY_BUTTON17                         = 10000h
JOY_BUTTON18                         = 20000h
JOY_BUTTON19                         = 40000h
JOY_BUTTON20                         = 80000h
JOY_BUTTON21                         = 100000h
JOY_BUTTON22                         = 200000h
JOY_BUTTON23                         = 400000h
JOY_BUTTON24                         = 800000h
JOY_BUTTON25                         = 1000000h
JOY_BUTTON26                         = 2000000h
JOY_BUTTON27                         = 4000000h
JOY_BUTTON28                         = 8000000h
JOY_BUTTON29                         = 10000000h
JOY_BUTTON30                         = 20000000h
JOY_BUTTON31                         = 40000000h
JOY_BUTTON32                         = 80000000h
JOY_POVCENTERED                      = -1
JOY_POVFORWARD                       = 0
JOY_POVRIGHT                         = 9000
JOY_POVBACKWARD                      = 18000
JOY_POVLEFT                          = 27000
JOY_RETURNX                          = 1h
JOY_RETURNY                          = 2h
JOY_RETURNZ                          = 4h
JOY_RETURNR                          = 8h
JOY_RETURNU                          = 10h
JOY_RETURNV                          = 20h
JOY_RETURNPOV                        = 40h
JOY_RETURNBUTTONS                    = 80h
JOY_RETURNRAWDATA                    = 100h
JOY_RETURNPOVCTS                     = 200h
JOY_RETURNCENTERED                   = 400h
JOY_USEDEADZONE                      = 800h
JOY_RETURNALL                        = JOY_RETURNX or JOY_RETURNY or JOY_RETURNZ or JOY_RETURNR or JOY_RETURNU or JOY_RETURNV or JOY_RETURNPOV or JOY_RETURNBUTTONS
JOY_CAL_READALWAYS                   = 10000h
JOY_CAL_READXYONLY                   = 20000h
JOY_CAL_READ3                        = 40000h
JOY_CAL_READ4                        = 80000h
JOY_CAL_READXONLY                    = 100000h
JOY_CAL_READYONLY                    = 200000h
JOY_CAL_READ5                        = 400000h
JOY_CAL_READ6                        = 800000h
JOY_CAL_READZONLY                    = 1000000h
JOY_CAL_READRONLY                    = 2000000h
JOY_CAL_READUONLY                    = 4000000h
JOY_CAL_READVONLY                    = 8000000h
WAVE_FORMAT_QUERY                    = 1h
SND_PURGE                            = 40h
SND_APPLICATION                      = 80h
WAVE_MAPPED                          = 4h
WAVE_FORMAT_DIRECT                   = 8h
WAVE_FORMAT_DIRECT_QUERY             = WAVE_FORMAT_QUERY or WAVE_FORMAT_DIRECT
MIM_MOREDATA                         = MM_MIM_MOREDATA
MOM_POSITIONCB                       = MM_MOM_POSITIONCB
MIDI_IO_STATUS                       = 20h
DRV_LOAD                             = 1h
DRV_ENABLE                           = 2h
DRV_OPEN                             = 3h
DRV_CLOSE                            = 4h
DRV_DISABLE                          = 5h
DRV_FREE                             = 6h
DRV_CONFIGURE                        = 7h
DRV_QUERYCONFIGURE                   = 8h
DRV_INSTALL                          = 9h
DRV_REMOVE                           = 0Ah
DRV_EXITSESSION                      = 0Bh
DRV_POWER                            = 0Fh
DRV_RESERVED                         = 800h
DRV_USER                             = 4000h
DRVCNF_CANCEL                        = 0h
DRVCNF_OK                            = 1h
DRVCNF_RESTART                       = 2h
DRV_CANCEL                           = DRVCNF_CANCEL
DRV_OK                               = DRVCNF_OK
DRV_RESTART                          = DRVCNF_RESTART
DRV_MCI_FIRST                        = DRV_RESERVED
DRV_MCI_LAST                         = DRV_RESERVED + 0FFFh
CALLBACK_TYPEMASK                    = 70000h
CALLBACK_NULL                        = 0h
CALLBACK_WINDOW                      = 10000h
CALLBACK_TASK                        = 20000h
CALLBACK_FUNCTION                    = 30000h
MM_MICROSOFT                         = 1
MM_MIDI_MAPPER                       = 1
MM_WAVE_MAPPER                       = 2
MM_SNDBLST_MIDIOUT                   = 3
MM_SNDBLST_MIDIIN                    = 4
MM_SNDBLST_SYNTH                     = 5
MM_SNDBLST_WAVEOUT                   = 6
MM_SNDBLST_WAVEIN                    = 7
MM_ADLIB                             = 9
MM_MPU401_MIDIOUT                    = 10
MM_MPU401_MIDIIN                     = 11
MM_PC_JOYSTICK                       = 12
SND_SYNC                             = 0h
SND_ASYNC                            = 1h
SND_NODEFAULT                        = 2h
SND_MEMORY                           = 4h
SND_ALIAS                            = 10000h
SND_FILENAME                         = 20000h
SND_RESOURCE                         = 40004h
SND_ALIAS_ID                         = 110000h
SND_ALIAS_START                      = 0
SND_LOOP                             = 8h
SND_NOSTOP                           = 10h
SND_VALID                            = 1Fh
SND_NOWAIT                           = 2000h
SND_VALIDFLAGS                       = 17201Fh
SND_RESERVED                         = 0FF000000h
SND_TYPE_MASK                        = 170007h
WAVERR_BADFORMAT                     = WAVERR_BASE + 0
WAVERR_STILLPLAYING                  = WAVERR_BASE + 1
WAVERR_UNPREPARED                    = WAVERR_BASE + 2
WAVERR_SYNC                          = WAVERR_BASE + 3
WAVERR_LASTERROR                     = WAVERR_BASE + 3
WOM_OPEN                             = MM_WOM_OPEN
WOM_CLOSE                            = MM_WOM_CLOSE
WOM_DONE                             = MM_WOM_DONE
WIM_OPEN                             = MM_WIM_OPEN
WIM_CLOSE                            = MM_WIM_CLOSE
WIM_DATA                             = MM_WIM_DATA
WAVE_MAPPER                          = -1
WAVE_ALLOWSYNC                       = 2h
WAVE_VALID                           = 3h
WHDR_DONE                            = 1h
WHDR_PREPARED                        = 2h
WHDR_BEGINLOOP                       = 4h
WHDR_ENDLOOP                         = 8h
WHDR_INQUEUE                         = 10h
WHDR_VALID                           = 1Fh
WAVECAPS_PITCH                       = 1h
WAVECAPS_PLAYBACKRATE                = 2h
WAVECAPS_VOLUME                      = 4h
WAVECAPS_LRVOLUME                    = 8h
WAVECAPS_SYNC                        = 10h
WAVE_INVALIDFORMAT                   = 0h
WAVE_FORMAT_1M08                     = 1h
WAVE_FORMAT_1S08                     = 2h
WAVE_FORMAT_1M16                     = 4h
WAVE_FORMAT_1S16                     = 8h
WAVE_FORMAT_2M08                     = 10h
WAVE_FORMAT_2S08                     = 20h
WAVE_FORMAT_2M16                     = 40h
WAVE_FORMAT_2S16                     = 80h
WAVE_FORMAT_4M08                     = 100h
WAVE_FORMAT_4S08                     = 200h
WAVE_FORMAT_4M16                     = 400h
WAVE_FORMAT_4S16                     = 800h
WAVE_FORMAT_PCM                      = 1
MIDIERR_UNPREPARED                   = MIDIERR_BASE + 0
MIDIERR_STILLPLAYING                 = MIDIERR_BASE + 1
MIDIERR_NOMAP                        = MIDIERR_BASE + 2
MIDIERR_NOTREADY                     = MIDIERR_BASE + 3
MIDIERR_NODEVICE                     = MIDIERR_BASE + 4
MIDIERR_INVALIDSETUP                 = MIDIERR_BASE + 5
MIDIERR_LASTERROR                    = MIDIERR_BASE + 5
MIM_OPEN                             = MM_MIM_OPEN
MIM_CLOSE                            = MM_MIM_CLOSE
MIM_DATA                             = MM_MIM_DATA
MIM_LONGDATA                         = MM_MIM_LONGDATA
MIM_ERROR                            = MM_MIM_ERROR
MIM_LONGERROR                        = MM_MIM_LONGERROR
MOM_OPEN                             = MM_MOM_OPEN
MOM_CLOSE                            = MM_MOM_CLOSE
MOM_DONE                             = MM_MOM_DONE
MIDIMAPPER                           = -1
MIDI_MAPPER                          = -1
MIDI_CACHE_ALL                       = 1
MIDI_CACHE_BESTFIT                   = 2
MIDI_CACHE_QUERY                     = 3
MIDI_UNCACHE                         = 4
MIDI_CACHE_VALID                     = MIDI_CACHE_ALL or MIDI_CACHE_BESTFIT or MIDI_CACHE_QUERY or MIDI_UNCACHE
MOD_MIDIPORT                         = 1
MOD_SYNTH                            = 2
MOD_SQSYNTH                          = 3
MOD_FMSYNTH                          = 4
MOD_MAPPER                           = 5
MIDICAPS_VOLUME                      = 1
MIDICAPS_LRVOLUME                    = 2
MIDICAPS_CACHE                       = 4
MHDR_DONE                            = 1
MHDR_PREPARED                        = 2
MHDR_INQUEUE                         = 4
MHDR_VALID                           = 7
MHDR_ISSTRM                      = 8
AUX_MAPPER                           = -1
AUXCAPS_CDAUDIO                      = 1
AUXCAPS_AUXIN                        = 2
AUXCAPS_VOLUME                       = 1h
AUXCAPS_LRVOLUME                     = 2h
TIMERR_NOERROR                       = 0
TIMERR_NOCANDO                       = TIMERR_BASE + 1
TIMERR_struct                        = TIMERR_BASE + 33
TIME_ONESHOT                         = 0
TIME_PERIODIC                        = 1
JOYERR_NOERROR                       = 0
JOYERR_PARMS                         = JOYERR_BASE + 5
JOYERR_NOCANDO                       = JOYERR_BASE + 6
JOYERR_UNPLUGGED                     = JOYERR_BASE + 7
JOY_BUTTON1                          = 1h
JOY_BUTTON2                          = 2h
JOY_BUTTON3                          = 4h
JOY_BUTTON4                          = 8h
JOY_BUTTON1CHG                       = 100h
JOY_BUTTON2CHG                       = 200h
JOY_BUTTON3CHG                       = 400h
JOY_BUTTON4CHG                       = 800h
JOYSTICKID1                          = 0
JOYSTICKID2                          = 1
MMIOERR_BASE                         = 256
MMIOERR_FILENOTFOUND                 = MMIOERR_BASE + 1
MMIOERR_OUTOFMEMORY                  = MMIOERR_BASE + 2
MMIOERR_CANNOTOPEN                   = MMIOERR_BASE + 3
MMIOERR_CANNOTCLOSE                  = MMIOERR_BASE + 4
MMIOERR_CANNOTREAD                   = MMIOERR_BASE + 5
MMIOERR_CANNOTWRITE                  = MMIOERR_BASE + 6
MMIOERR_CANNOTSEEK                   = MMIOERR_BASE + 7
MMIOERR_CANNOTEXPAND                 = MMIOERR_BASE + 8
MMIOERR_CHUNKNOTFOUND                = MMIOERR_BASE + 9
MMIOERR_UNBUFFERED                   = MMIOERR_BASE + 10
MMIO_RWMODE                          = 3h
MMIO_SHAREMODE                       = 70h
MMIO_CREATE                          = 1000h
MMIO_PARSE                           = 100h
MMIO_DELETE                          = 200h
MMIO_EXIST                           = 4000h
MMIO_ALLOCBUF                        = 10000h
MMIO_GETTEMP                         = 20000h
MMIO_DIRTY                           = 10000000h
MMIO_OPEN_VALID                      = 3FFFFh
MMIO_READ                            = 0h
MMIO_WRITE                           = 1h
MMIO_READWRITE                       = 2h
MMIO_COMPAT                          = 0h
MMIO_EXCLUSIVE                       = 10h
MMIO_DENYWRITE                       = 20h
MMIO_DENYREAD                        = 30h
MMIO_DENYNONE                        = 40h
MMIO_FHOPEN                          = 10h
MMIO_EMPTYBUF                        = 10h
MMIO_TOUPPER                         = 10h
MMIO_INSTALLPROC                     = 10000h
MMIO_GLOBALPROC                      = 10000000h
MMIO_UNICODEPROC                     = 1000000h
MMIO_REMOVEPROC                      = 20000h
MMIO_FINDPROC                        = 40000h
MMIO_FINDCHUNK                       = 10h
MMIO_FINDRIFF                        = 20h
MMIO_FINDLIST                        = 40h
MMIO_CREATERIFF                      = 20h
MMIO_CREATELIST                      = 40h
MMIO_VALIDPROC                       = 11070000h
MMIOM_READ                           = MMIO_READ
MMIOM_WRITE                          = MMIO_WRITE
MMIOM_SEEK                           = 2
MMIOM_OPEN                           = 3
MMIOM_CLOSE                          = 4
MMIOM_WRITEFLUSH                     = 5
MMIOM_RENAME                         = 6
MMIOM_USER                           = 8000h
SEEK_SET                             = 0
SEEK_CUR                             = 1
SEEK_END                             = 2
MMIO_DEFAULTBUFFER                   = 8192
MCIERR_INVALID_DEVICE_ID             = MCIERR_BASE + 1
MCIERR_UNRECOGNIZED_KEYWORD          = MCIERR_BASE + 3
MCIERR_UNRECOGNIZED_COMMAND          = MCIERR_BASE + 5
MCIERR_HARDWARE                      = MCIERR_BASE + 6
MCIERR_INVALID_DEVICE_NAME           = MCIERR_BASE + 7
MCIERR_OUT_OF_MEMORY                 = MCIERR_BASE + 8
MCIERR_DEVICE_OPEN                   = MCIERR_BASE + 9
MCIERR_CANNOT_LOAD_DRIVER            = MCIERR_BASE + 10
MCIERR_MISSING_COMMAND_STRING        = MCIERR_BASE + 11
MCIERR_PARAM_OVERFLOW                = MCIERR_BASE + 12
MCIERR_MISSING_STRING_ARGUMENT       = MCIERR_BASE + 13
MCIERR_BAD_INTEGER                   = MCIERR_BASE + 14
MCIERR_PARSER_INTERNAL               = MCIERR_BASE + 15
MCIERR_DRIVER_INTERNAL               = MCIERR_BASE + 16
MCIERR_MISSING_PARAMETER             = MCIERR_BASE + 17
MCIERR_UNSUPPORTED_FUNCTION          = MCIERR_BASE + 18
MCIERR_FILE_NOT_FOUND                = MCIERR_BASE + 19
MCIERR_DEVICE_NOT_READY              = MCIERR_BASE + 20
MCIERR_INTERNAL                      = MCIERR_BASE + 21
MCIERR_DRIVER                        = MCIERR_BASE + 22
MCIERR_CANNOT_USE_ALL                = MCIERR_BASE + 23
MCIERR_MULTIPLE                      = MCIERR_BASE + 24
MCIERR_EXTENSION_NOT_FOUND           = MCIERR_BASE + 25
MCIERR_OUTOFRANGE                    = MCIERR_BASE + 26
MCIERR_FLAGS_NOT_COMPATIBLE          = MCIERR_BASE + 28
MCIERR_FILE_NOT_SAVED                = MCIERR_BASE + 30
MCIERR_DEVICE_TYPE_REQUIRED          = MCIERR_BASE + 31
MCIERR_DEVICE_LOCKED                 = MCIERR_BASE + 32
MCIERR_DUPLICATE_ALIAS               = MCIERR_BASE + 33
MCIERR_BAD_CONSTANT                  = MCIERR_BASE + 34
MCIERR_MUST_USE_SHAREABLE            = MCIERR_BASE + 35
MCIERR_MISSING_DEVICE_NAME           = MCIERR_BASE + 36
MCIERR_BAD_TIME_FORMAT               = MCIERR_BASE + 37
MCIERR_NO_CLOSING_QUOTE              = MCIERR_BASE + 38
MCIERR_DUPLICATE_FLAGS               = MCIERR_BASE + 39
MCIERR_INVALID_FILE                  = MCIERR_BASE + 40
MCIERR_NULL_PARAMETER_BLOCK          = MCIERR_BASE + 41
MCIERR_UNNAMED_RESOURCE              = MCIERR_BASE + 42
MCIERR_NEW_REQUIRES_ALIAS            = MCIERR_BASE + 43
MCIERR_NOTIFY_ON_AUTO_OPEN           = MCIERR_BASE + 44
MCIERR_NO_ELEMENT_ALLOWED            = MCIERR_BASE + 45
MCIERR_NONAPPLICABLE_FUNCTION        = MCIERR_BASE + 46
MCIERR_ILLEGAL_FOR_AUTO_OPEN         = MCIERR_BASE + 47
MCIERR_FILENAME_REQUIRED             = MCIERR_BASE + 48
MCIERR_EXTRA_CHARACTERS              = MCIERR_BASE + 49
MCIERR_DEVICE_NOT_INSTALLED          = MCIERR_BASE + 50
MCIERR_GET_CD                        = MCIERR_BASE + 51
MCIERR_SET_CD                        = MCIERR_BASE + 52
MCIERR_SET_DRIVE                     = MCIERR_BASE + 53
MCIERR_DEVICE_LENGTH                 = MCIERR_BASE + 54
MCIERR_DEVICE_ORD_LENGTH             = MCIERR_BASE + 55
MCIERR_NO_INTEGER                    = MCIERR_BASE + 56
MCIERR_WAVE_OUTPUTSINUSE             = MCIERR_BASE + 64
MCIERR_WAVE_SETOUTPUTINUSE           = MCIERR_BASE + 65
MCIERR_WAVE_INPUTSINUSE              = MCIERR_BASE + 66
MCIERR_WAVE_SETINPUTINUSE            = MCIERR_BASE + 67
MCIERR_WAVE_OUTPUTUNSPECIFIED        = MCIERR_BASE + 68
MCIERR_WAVE_INPUTUNSPECIFIED         = MCIERR_BASE + 69
MCIERR_WAVE_OUTPUTSUNSUITABLE        = MCIERR_BASE + 70
MCIERR_WAVE_SETOUTPUTUNSUITABLE      = MCIERR_BASE + 71
MCIERR_WAVE_INPUTSUNSUITABLE         = MCIERR_BASE + 72
MCIERR_WAVE_SETINPUTUNSUITABLE       = MCIERR_BASE + 73
MCIERR_SEQ_DIV_INCOMPATIBLE          = MCIERR_BASE + 80
MCIERR_SEQ_PORT_INUSE                = MCIERR_BASE + 81
MCIERR_SEQ_PORT_NONEXISTENT          = MCIERR_BASE + 82
MCIERR_SEQ_PORT_MAPNODEVICE          = MCIERR_BASE + 83
MCIERR_SEQ_PORT_MISCERROR            = MCIERR_BASE + 84
MCIERR_SEQ_TIMER                     = MCIERR_BASE + 85
MCIERR_SEQ_PORTUNSPECIFIED           = MCIERR_BASE + 86
MCIERR_SEQ_NOMIDIPRESENT             = MCIERR_BASE + 87
MCIERR_NO_WINDOW                     = MCIERR_BASE + 90
MCIERR_CREATEWINDOW                  = MCIERR_BASE + 91
MCIERR_FILE_READ                     = MCIERR_BASE + 92
MCIERR_FILE_WRITE                    = MCIERR_BASE + 93
MCIERR_CUSTOM_DRIVER_BASE            = MCIERR_BASE + 256
MCI_FIRST                            = 800h
MCI_OPEN                             = 803h
MCI_CLOSE                            = 804h
MCI_ESCAPE                           = 805h
MCI_PLAY                             = 806h
MCI_SEEK                             = 807h
MCI_STOP                             = 808h
MCI_PAUSE                            = 809h
MCI_INFO                             = 80Ah
MCI_GETDEVCAPS                       = 80Bh
MCI_SPIN                             = 80Ch
MCI_SET                              = 80Dh
MCI_STEP                             = 80Eh
MCI_RECORD                           = 80Fh
MCI_SYSINFO                          = 810h
MCI_BREAK                            = 811h
MCI_SOUND                            = 812h
MCI_SAVE                             = 813h
MCI_STATUS                           = 814h
MCI_CUE                              = 830h
MCI_REALIZE                          = 840h
MCI_WINDOW                           = 841h
MCI_PUT                              = 842h
MCI_WHERE                            = 843h
MCI_FREEZE                           = 844h
MCI_UNFREEZE                         = 845h
MCI_LOAD                             = 850h
MCI_CUT                              = 851h
MCI_COPY                             = 852h
MCI_PASTE                            = 853h
MCI_UPDATE                           = 854h
MCI_RESUME                           = 855h
MCI_DELETE                           = 856h
MCI_LAST                             = 0FFFh
MCI_USER_MESSAGES                    = 400h + MCI_FIRST
MCI_ALL_DEVICE_ID                    = -1
MCI_DEVTYPE_VCR                      = 513
MCI_DEVTYPE_VIDEODISC                = 514
MCI_DEVTYPE_OVERLAY                  = 515
MCI_DEVTYPE_CD_AUDIO                 = 516
MCI_DEVTYPE_DAT                      = 517
MCI_DEVTYPE_SCANNER                  = 518
MCI_DEVTYPE_ANIMATION                = 519
MCI_DEVTYPE_DIGITAL_VIDEO            = 520
MCI_DEVTYPE_OTHER                    = 521
MCI_DEVTYPE_WAVEFORM_AUDIO           = 522
MCI_DEVTYPE_SEQUENCER                = 523
MCI_DEVTYPE_FIRST                    = MCI_DEVTYPE_VCR
MCI_DEVTYPE_LAST                     = MCI_DEVTYPE_SEQUENCER
MCI_DEVTYPE_FIRST_USER               = 1000h
MCI_MODE_NOT_READY                   = MCI_STRING_OFFSET + 12
MCI_MODE_STOP                        = MCI_STRING_OFFSET + 13
MCI_MODE_PLAY                        = MCI_STRING_OFFSET + 14
MCI_MODE_RECORD                      = MCI_STRING_OFFSET + 15
MCI_MODE_SEEK                        = MCI_STRING_OFFSET + 16
MCI_MODE_PAUSE                       = MCI_STRING_OFFSET + 17
MCI_MODE_OPEN                        = MCI_STRING_OFFSET + 18
MCI_FORMAT_MILLISECONDS              = 0
MCI_FORMAT_HMS                       = 1
MCI_FORMAT_MSF                       = 2
MCI_FORMAT_FRAMES                    = 3
MCI_FORMAT_SMPTE_24                  = 4
MCI_FORMAT_SMPTE_25                  = 5
MCI_FORMAT_SMPTE_30                  = 6
MCI_FORMAT_SMPTE_30DROP              = 7
MCI_FORMAT_BYTES                     = 8
MCI_FORMAT_SAMPLES                   = 9
MCI_FORMAT_TMSF                      = 10
MCI_NOTIFY_SUCCESSFUL                = 1h
MCI_NOTIFY_SUPERSEDED                = 2h
MCI_NOTIFY_ABORTED                   = 4h
MCI_NOTIFY_FAILURE                   = 8h
MCI_NOTIFY                           = 1h
MCI_WAIT                             = 2h
MCI_FROM                             = 4h
MCI_TO                               = 8h
MCI_TRACK                            = 10h
MCI_OPEN_SHAREABLE                   = 100h
MCI_OPEN_ELEMENT                     = 200h
MCI_OPEN_ALIAS                       = 400h
MCI_OPEN_ELEMENT_ID                  = 800h
MCI_OPEN_TYPE_ID                     = 1000h
MCI_OPEN_TYPE                        = 2000h
MCI_SEEK_TO_START                    = 100h
MCI_SEEK_TO_END                      = 200h
MCI_STATUS_ITEM                      = 100h
MCI_STATUS_START                     = 200h
MCI_STATUS_LENGTH                    = 1h
MCI_STATUS_POSITION                  = 2h
MCI_STATUS_NUMBER_OF_TRACKS          = 3h
MCI_STATUS_MODE                      = 4h
MCI_STATUS_MEDIA_PRESENT             = 5h
MCI_STATUS_TIME_FORMAT               = 6h
MCI_STATUS_READY                     = 7h
MCI_STATUS_CURRENT_TRACK             = 8h
MCI_INFO_PRODUCT                     = 100h
MCI_INFO_FILE                        = 200h
MCI_GETDEVCAPS_ITEM                  = 100h
MCI_GETDEVCAPS_CAN_RECORD            = 1h
MCI_GETDEVCAPS_HAS_AUDIO             = 2h
MCI_GETDEVCAPS_HAS_VIDEO             = 3h
MCI_GETDEVCAPS_DEVICE_TYPE           = 4h
MCI_GETDEVCAPS_USES_FILES            = 5h
MCI_GETDEVCAPS_COMPOUND_DEVICE       = 6h
MCI_GETDEVCAPS_CAN_EJECT             = 7h
MCI_GETDEVCAPS_CAN_PLAY              = 8h
MCI_GETDEVCAPS_CAN_SAVE              = 9h
MCI_SYSINFO_QUANTITY                 = 100h
MCI_SYSINFO_OPEN                     = 200h
MCI_SYSINFO_NAME                     = 400h
MCI_SYSINFO_INSTALLNAME              = 800h
MCI_SET_DOOR_OPEN                    = 100h
MCI_SET_DOOR_CLOSED                  = 200h
MCI_SET_TIME_FORMAT                  = 400h
MCI_SET_AUDIO                        = 800h
MCI_SET_VIDEO                        = 1000h
MCI_SET_ON                           = 2000h
MCI_SET_OFF                          = 4000h
MCI_SET_AUDIO_ALL                    = 4001h
MCI_SET_AUDIO_LEFT                   = 4002h
MCI_SET_AUDIO_RIGHT                  = 4003h
MCI_BREAK_KEY                        = 100h
MCI_BREAK_HWND                       = 200h
MCI_BREAK_OFF                        = 400h
MCI_RECORD_INSERT                    = 100h
MCI_RECORD_OVERWRITE                 = 200h
MCI_SOUND_NAME                       = 100h
MCI_SAVE_FILE                        = 100h
MCI_LOAD_FILE                        = 100h
MCI_VD_MODE_PARK                     = MCI_VD_OFFSET + 1
MCI_VD_MEDIA_CLV                     = MCI_VD_OFFSET + 2
MCI_VD_MEDIA_CAV                     = MCI_VD_OFFSET + 3
MCI_VD_MEDIA_OTHER                   = MCI_VD_OFFSET + 4
MCI_VD_FORMAT_TRACK                  = 4001h
MCI_VD_PLAY_REVERSE                  = 10000h
MCI_VD_PLAY_FAST                     = 20000h
MCI_VD_PLAY_SPEED                    = 40000h
MCI_VD_PLAY_SCAN                     = 80000h
MCI_VD_PLAY_SLOW                     = 100000h
MCI_VD_SEEK_REVERSE                  = 10000h
MCI_VD_STATUS_SPEED                  = 4002h
MCI_VD_STATUS_FORWARD                = 4003h
MCI_VD_STATUS_MEDIA_TYPE             = 4004h
MCI_VD_STATUS_SIDE                   = 4005h
MCI_VD_STATUS_DISC_SIZE              = 4006h
MCI_VD_GETDEVCAPS_CLV                = 10000h
MCI_VD_GETDEVCAPS_CAV                = 20000h
MCI_VD_SPIN_UP                       = 10000h
MCI_VD_SPIN_DOWN                     = 20000h
MCI_VD_GETDEVCAPS_CAN_REVERSE        = 4002h
MCI_VD_GETDEVCAPS_FAST_RATE          = 4003h
MCI_VD_GETDEVCAPS_SLOW_RATE          = 4004h
MCI_VD_GETDEVCAPS_NORMAL_RATE        = 4005h
MCI_VD_STEP_FRAMES                   = 10000h
MCI_VD_STEP_REVERSE                  = 20000h
MCI_VD_ESCAPE_STRING                 = 100h
MCI_WAVE_PCM                         = MCI_WAVE_OFFSET + 0
MCI_WAVE_MAPPER                      = MCI_WAVE_OFFSET + 1
MCI_WAVE_OPEN_BUFFER                 = 10000h
MCI_WAVE_SET_FORMATTAG               = 10000h
MCI_WAVE_SET_CHANNELS                = 20000h
MCI_WAVE_SET_SAMPLESPERSEC           = 40000h
MCI_WAVE_SET_AVGBYTESPERSEC          = 80000h
MCI_WAVE_SET_BLOCKALIGN              = 100000h
MCI_WAVE_SET_BITSPERSAMPLE           = 200000h
MCI_WAVE_INPUT                       = 400000h
MCI_WAVE_OUTPUT                      = 800000h
MCI_WAVE_STATUS_FORMATTAG            = 4001h
MCI_WAVE_STATUS_CHANNELS             = 4002h
MCI_WAVE_STATUS_SAMPLESPERSEC        = 4003h
MCI_WAVE_STATUS_AVGBYTESPERSEC       = 4004h
MCI_WAVE_STATUS_BLOCKALIGN           = 4005h
MCI_WAVE_STATUS_BITSPERSAMPLE        = 4006h
MCI_WAVE_STATUS_LEVEL                = 4007h
MCI_WAVE_SET_ANYINPUT                = 4000000h
MCI_WAVE_SET_ANYOUTPUT               = 8000000h
MCI_WAVE_GETDEVCAPS_INPUTS           = 4001h
MCI_WAVE_GETDEVCAPS_OUTPUTS          = 4002h
MCI_SEQ_DIV_PPQN                     = 0 + MCI_SEQ_OFFSET
MCI_SEQ_DIV_SMPTE_24                 = 1 + MCI_SEQ_OFFSET
MCI_SEQ_DIV_SMPTE_25                 = 2 + MCI_SEQ_OFFSET
MCI_SEQ_DIV_SMPTE_30DROP             = 3 + MCI_SEQ_OFFSET
MCI_SEQ_DIV_SMPTE_30                 = 4 + MCI_SEQ_OFFSET
MCI_SEQ_FORMAT_SONGPTR               = 4001h
MCI_SEQ_FILE                         = 4002h
MCI_SEQ_MIDI                         = 4003h
MCI_SEQ_SMPTE                        = 4004h
MCI_SEQ_NONE                         = 65533
MCI_SEQ_MAPPER                       = 65535
MCI_SEQ_STATUS_TEMPO                 = 4002h
MCI_SEQ_STATUS_PORT                  = 4003h
MCI_SEQ_STATUS_SLAVE                 = 4007h
MCI_SEQ_STATUS_MASTER                = 4008h
MCI_SEQ_STATUS_OFFSET                = 4009h
MCI_SEQ_STATUS_DIVTYPE               = 400Ah
MCI_SEQ_SET_TEMPO                    = 10000h
MCI_SEQ_SET_PORT                     = 20000h
MCI_SEQ_SET_SLAVE                    = 40000h
MCI_SEQ_SET_MASTER                   = 80000h
MCI_SEQ_SET_OFFSET                   = 1000000h
MCI_ANIM_OPEN_WS                     = 10000h
MCI_ANIM_OPEN_PARENT                 = 20000h
MCI_ANIM_OPEN_NOSTATIC               = 40000h
MCI_ANIM_PLAY_SPEED                  = 10000h
MCI_ANIM_PLAY_REVERSE                = 20000h
MCI_ANIM_PLAY_FAST                   = 40000h
MCI_ANIM_PLAY_SLOW                   = 80000h
MCI_ANIM_PLAY_SCAN                   = 100000h
MCI_ANIM_STEP_REVERSE                = 10000h
MCI_ANIM_STEP_FRAMES                 = 20000h
MCI_ANIM_STATUS_SPEED                = 4001h
MCI_ANIM_STATUS_FORWARD              = 4002h
MCI_ANIM_STATUS_HWND                 = 4003h
MCI_ANIM_STATUS_HPAL                 = 4004h
MCI_ANIM_STATUS_STRETCH              = 4005h
MCI_ANIM_INFO_TEXT                   = 10000h
MCI_ANIM_GETDEVCAPS_CAN_REVERSE      = 4001h
MCI_ANIM_GETDEVCAPS_FAST_RATE        = 4002h
MCI_ANIM_GETDEVCAPS_SLOW_RATE        = 4003h
MCI_ANIM_GETDEVCAPS_NORMAL_RATE      = 4004h
MCI_ANIM_GETDEVCAPS_PALETTES         = 4006h
MCI_ANIM_GETDEVCAPS_CAN_STRETCH      = 4007h
MCI_ANIM_GETDEVCAPS_MAX_WINDOWS      = 4008h
MCI_ANIM_REALIZE_NORM                = 10000h
MCI_ANIM_REALIZE_BKGD                = 20000h
MCI_ANIM_WINDOW_HWND                 = 10000h
MCI_ANIM_WINDOW_STATE                = 40000h
MCI_ANIM_WINDOW_TEXT                 = 80000h
MCI_ANIM_WINDOW_ENABLE_STRETCH       = 100000h
MCI_ANIM_WINDOW_DISABLE_STRETCH      = 200000h
MCI_ANIM_WINDOW_DEFAULT              = 0h
MCI_ANIM_RECT                        = 10000h
MCI_ANIM_PUT_SOURCE                  = 20000h
MCI_ANIM_PUT_DESTINATION             = 40000h
MCI_ANIM_WHERE_SOURCE                = 20000h
MCI_ANIM_WHERE_DESTINATION           = 40000h
MCI_ANIM_UPDATE_HDC                  = 20000h
MCI_OVLY_OPEN_WS                     = 10000h
MCI_OVLY_OPEN_PARENT                 = 20000h
MCI_OVLY_STATUS_HWND                 = 4001h
MCI_OVLY_STATUS_STRETCH              = 4002h
MCI_OVLY_INFO_TEXT                   = 10000h
MCI_OVLY_GETDEVCAPS_CAN_STRETCH      = 4001h
MCI_OVLY_GETDEVCAPS_CAN_FREEZE       = 4002h
MCI_OVLY_GETDEVCAPS_MAX_WINDOWS      = 4003h
MCI_OVLY_WINDOW_HWND                 = 10000h
MCI_OVLY_WINDOW_STATE                = 40000h
MCI_OVLY_WINDOW_TEXT                 = 80000h
MCI_OVLY_WINDOW_ENABLE_STRETCH       = 100000h
MCI_OVLY_WINDOW_DISABLE_STRETCH      = 200000h
MCI_OVLY_WINDOW_DEFAULT              = 0h
MCI_OVLY_RECT                        = 10000h
MCI_OVLY_PUT_SOURCE                  = 20000h
MCI_OVLY_PUT_DESTINATION             = 40000h
MCI_OVLY_PUT_FRAME                   = 80000h
MCI_OVLY_PUT_VIDEO                   = 100000h
MCI_OVLY_WHERE_SOURCE                = 20000h
MCI_OVLY_WHERE_DESTINATION           = 40000h
MCI_OVLY_WHERE_FRAME                 = 80000h
MCI_OVLY_WHERE_VIDEO                 = 100000h
CAPS1                                = 94
C1_TRANSPARENT                       = 1h
NEWTRANSPARENT                       = 3
QUERYROPSUPPORT                      = 40
SELECTDIB                            = 41
SE_ERR_SHARE                         = 26
SE_ERR_ASSOCINCOMPLETE               = 27
SE_ERR_DDETIMEOUT                    = 28
SE_ERR_DDEFAIL                       = 29
SE_ERR_DDEBUSY                       = 30
SE_ERR_NOASSOC                       = 31
PRINTER_CONTROL_PAUSE                = 1
PRINTER_CONTROL_RESUME               = 2
PRINTER_CONTROL_PURGE                = 3
PRINTER_STATUS_PAUSED                = 1h
PRINTER_STATUS_ERROR                 = 2h
PRINTER_STATUS_PENDING_DELETION      = 4h
PRINTER_STATUS_PAPER_JAM             = 8h
PRINTER_STATUS_PAPER_OUT             = 10h
PRINTER_STATUS_MANUAL_FEED           = 20h
PRINTER_STATUS_PAPER_PROBLEM         = 40h
PRINTER_STATUS_OFFLINE               = 80h
PRINTER_STATUS_IO_ACTIVE             = 100h
PRINTER_STATUS_BUSY                  = 200h
PRINTER_STATUS_PRINTING              = 400h
PRINTER_STATUS_OUTPUT_BIN_FULL       = 800h
PRINTER_STATUS_NOT_AVAILABLE         = 1000h
PRINTER_STATUS_WAITING               = 2000h
PRINTER_STATUS_PROCESSING            = 4000h
PRINTER_STATUS_INITIALIZING          = 8000h
PRINTER_STATUS_WARMING_UP            = 10000h
PRINTER_STATUS_TONER_LOW             = 20000h
PRINTER_STATUS_NO_TONER              = 40000h
PRINTER_STATUS_PAGE_PUNT             = 80000h
PRINTER_STATUS_USER_INTERVENTION     = 100000h
PRINTER_STATUS_OUT_OF_MEMORY         = 200000h
PRINTER_STATUS_DOOR_OPEN             = 400000h
PRINTER_ATTRIBUTE_QUEUED             = 1h
PRINTER_ATTRIBUTE_DIRECT             = 2h
PRINTER_ATTRIBUTE_DEFAULT            = 4h
PRINTER_ATTRIBUTE_SHARED             = 8h
PRINTER_ATTRIBUTE_NETWORK            = 10h
PRINTER_ATTRIBUTE_HIDDEN             = 20h
PRINTER_ATTRIBUTE_LOCAL              = 40h
NO_PRIORITY                          = 0
MAX_PRIORITY                         = 99
MIN_PRIORITY                         = 1
DEF_PRIORITY                         = 1
JOB_CONTROL_PAUSE                    = 1
JOB_CONTROL_RESUME                   = 2
JOB_CONTROL_CANCEL                   = 3
JOB_CONTROL_RESTART                  = 4
JOB_STATUS_PAUSED                    = 1h
JOB_STATUS_ERROR                     = 2h
JOB_STATUS_DELETING                  = 4h
JOB_STATUS_SPOOLING                  = 8h
JOB_STATUS_PRINTING                  = 10h
JOB_STATUS_OFFLINE                   = 20h
JOB_STATUS_PAPEROUT                  = 40h
JOB_STATUS_PRINTED                   = 80h
JOB_POSITION_UNSPECIFIED             = 0
FORM_BUILTIN                         = 1h
PRINTER_CONTROL_SET_STATUS           = 4
PRINTER_ATTRIBUTE_WORK_OFFLINE       = 400h
PRINTER_ATTRIBUTE_ENABLE_BIDI        = 800h
JOB_CONTROL_DELETE                   = 5
JOB_STATUS_USER_INTERVENTION         = 10000h
DI_CHANNEL                           = 1
DI_READ_SPOOL_JOB                    = 3
PORT_TYPE_WRITE                      = 1h
PORT_TYPE_READ                       = 2h
PORT_TYPE_REDIRECTED                 = 4h
PORT_TYPE_NET_ATTACHED               = 8h
PRINTER_ENUM_DEFAULT                 = 1h
PRINTER_ENUM_LOCAL                   = 2h
PRINTER_ENUM_CONNECTIONS             = 4h
PRINTER_ENUM_FAVORITE                = 4h
PRINTER_ENUM_NAME                    = 8h
PRINTER_ENUM_REMOTE                  = 10h
PRINTER_ENUM_SHARED                  = 20h
PRINTER_ENUM_NETWORK                 = 40h
PRINTER_ENUM_EXPAND                  = 4000h
PRINTER_ENUM_CONTAINER               = 8000h
PRINTER_ENUM_ICONMASK                = 0FF0000h
PRINTER_ENUM_ICON1                   = 10000h
PRINTER_ENUM_ICON2                   = 20000h
PRINTER_ENUM_ICON3                   = 40000h
PRINTER_ENUM_ICON4                   = 80000h
PRINTER_ENUM_ICON5                   = 100000h
PRINTER_ENUM_ICON6                   = 200000h
PRINTER_ENUM_ICON7                   = 400000h
PRINTER_ENUM_ICON8                   = 800000h
PRINTER_CHANGE_ADD_PRINTER           = 1h
PRINTER_CHANGE_SET_PRINTER           = 2h
PRINTER_CHANGE_DELETE_PRINTER        = 4h
PRINTER_CHANGE_PRINTER               = 0FFh
PRINTER_CHANGE_ADD_JOB               = 100h
PRINTER_CHANGE_SET_JOB               = 200h
PRINTER_CHANGE_DELETE_JOB            = 400h
PRINTER_CHANGE_WRITE_JOB             = 800h
PRINTER_CHANGE_JOB                   = 0FF00h
PRINTER_CHANGE_ADD_FORM              = 10000h
PRINTER_CHANGE_SET_FORM              = 20000h
PRINTER_CHANGE_DELETE_FORM           = 40000h
PRINTER_CHANGE_FORM                  = 70000h
PRINTER_CHANGE_ADD_PORT              = 100000h
PRINTER_CHANGE_CONFIGURE_PORT        = 200000h
PRINTER_CHANGE_DELETE_PORT           = 400000h
PRINTER_CHANGE_PORT                  = 700000h
PRINTER_CHANGE_ADD_PRINT_PROCESSOR   = 1000000h
PRINTER_CHANGE_DELETE_PRINT_PROCESSOR                = 4000000h
PRINTER_CHANGE_PRINT_PROCESSOR       = 7000000h
PRINTER_CHANGE_ADD_PRINTER_DRIVER    = 10000000h
PRINTER_CHANGE_DELETE_PRINTER_DRIVER = 40000000h
PRINTER_CHANGE_PRINTER_DRIVER        = 70000000h
PRINTER_CHANGE_TIMEOUT               = 80000000h
PRINTER_CHANGE_ALL                   = 7777FFFFh
PRINTER_ERROR_INFORMATION            = 80000000h
PRINTER_ERROR_WARNING                = 40000000h
PRINTER_ERROR_SEVERE                 = 20000000h
PRINTER_ERROR_OUTOFPAPER             = 1h
PRINTER_ERROR_JAM                    = 2h
PRINTER_ERROR_OUTOFTONER             = 4h
SERVER_ACCESS_ADMINISTER             = 1h
SERVER_ACCESS_ENUMERATE              = 2h
PRINTER_ACCESS_ADMINISTER            = 4h
PRINTER_ACCESS_USE                   = 8h
JOB_ACCESS_ADMINISTER                = 10h
SERVER_ALL_ACCESS                    = STANDARD_RIGHTS_REQUIRED or SERVER_ACCESS_ADMINISTER or SERVER_ACCESS_ENUMERATE
SERVER_READ                          = STANDARD_RIGHTS_READ or SERVER_ACCESS_ENUMERATE
SERVER_WRITE                         = STANDARD_RIGHTS_WRITE or SERVER_ACCESS_ADMINISTER or SERVER_ACCESS_ENUMERATE
SERVER_EXECUTE                       = STANDARD_RIGHTS_EXECUTE or SERVER_ACCESS_ENUMERATE
PRINTER_ALL_ACCESS                   = STANDARD_RIGHTS_REQUIRED or PRINTER_ACCESS_ADMINISTER or PRINTER_ACCESS_USE
PRINTER_READ                         = STANDARD_RIGHTS_READ or PRINTER_ACCESS_USE
PRINTER_WRITE                        = STANDARD_RIGHTS_WRITE or PRINTER_ACCESS_USE
PRINTER_EXECUTE                      = STANDARD_RIGHTS_EXECUTE or PRINTER_ACCESS_USE
JOB_ALL_ACCESS                       = STANDARD_RIGHTS_REQUIRED or JOB_ACCESS_ADMINISTER
JOB_READ                             = STANDARD_RIGHTS_READ or JOB_ACCESS_ADMINISTER
JOB_WRITE                            = STANDARD_RIGHTS_WRITE or JOB_ACCESS_ADMINISTER
JOB_EXECUTE                          = STANDARD_RIGHTS_EXECUTE or JOB_ACCESS_ADMINISTER
RESOURCE_CONNECTED                   = 1h
RESOURCE_PUBLICNET                   = 2h
RESOURCE_GLOBALNET                   = 2h
RESOURCE_REMEMBERED                  = 3h
RESOURCE_RECENT                      = 4h
RESOURCE_CONTEXT                     = 5h
RESOURCETYPE_ANY                     = 0h
RESOURCETYPE_DISK                    = 1h
RESOURCETYPE_PRINT                   = 2h
RESOURCETYPE_UNKNOWN                 = 0FFFFh
RESOURCEUSAGE_CONNECTABLE            = 1h
RESOURCEUSAGE_CONTAINER              = 2h
RESOURCEUSAGE_RESERVED               = 80000000h
RESOURCEDISPLAYTYPE_GENERIC          = 0h
RESOURCEDISPLAYTYPE_DOMAIN           = 1h
RESOURCEDISPLAYTYPE_SERVER           = 2h
RESOURCEDISPLAYTYPE_SHARE            = 3h
RESOURCEDISPLAYTYPE_FILE             = 4h
RESOURCEDISPLAYTYPE_GROUP            = 5h
CONNECT_UPDATE_PROFILE               = 1h
WN_SUCCESS                           = NO_ERROR
WN_NOT_SUPPORTED                     = ERROR_NOT_SUPPORTED
WN_NET_ERROR                         = ERROR_UNEXP_NET_ERR
WN_MORE_DATA                         = ERROR_MORE_DATA
WN_BAD_POINTER                       = ERROR_INVALID_ADDRESS
WN_BAD_VALUE                         = ERROR_INVALID_PARAMETER
WN_BAD_PASSWORD                      = ERROR_INVALID_PASSWORD
WN_ACCESS_DENIED                     = ERROR_ACCESS_DENIED
WN_FUNCTION_BUSY                     = ERROR_BUSY
WN_WINDOWS_ERROR                     = ERROR_UNEXP_NET_ERR
WN_BAD_USER                          = ERROR_BAD_USERNAME
WN_OUT_OF_MEMORY                     = ERROR_NOT_ENOUGH_MEMORY
WN_NO_NETWORK                        = ERROR_NO_NETWORK
WN_EXTENDED_ERROR                    = ERROR_EXTENDED_ERROR
WN_NOT_CONNECTED                     = ERROR_NOT_CONNECTED
WN_OPEN_FILES                        = ERROR_OPEN_FILES
WN_DEVICE_IN_USE                     = ERROR_DEVICE_IN_USE
WN_BAD_NETNAME                       = ERROR_BAD_NET_NAME
WN_BAD_LOCALNAME                     = ERROR_BAD_DEVICE
WN_ALREADY_CONNECTED                 = ERROR_ALREADY_ASSIGNED
WN_DEVICE_ERROR                      = ERROR_GEN_FAILURE
WN_CONNECTION_CLOSED                 = ERROR_CONNECTION_UNAVAIL
WN_NO_NET_OR_BAD_PATH                = ERROR_NO_NET_OR_BAD_PATH
WN_BAD_PROVIDER                      = ERROR_BAD_PROVIDER
WN_CANNOT_OPEN_PROFILE               = ERROR_CANNOT_OPEN_PROFILE
WN_BAD_PROFILE                       = ERROR_BAD_PROFILE
WN_BAD_HANDLE                        = ERROR_INVALID_HANDLE
WN_NO_MORE_ENTRIES                   = ERROR_NO_MORE_ITEMS
WN_NOT_CONTAINER                     = ERROR_NOT_CONTAINER
WN_NO_ERROR                          = NO_ERROR
NCBNAMSZ                             = 16
MAX_LANA                             = 254
NAME_FLAGS_MASK                      = 87h
GROUP_NAME                           = 80h
UNIQUE_NAME                          = 0h
REGISTERING                          = 0h
REGISTERED                           = 4h
DEREGISTERED                         = 5h
DUPLICATE                            = 6h
DUPLICATE_DEREG                      = 7h
LISTEN_OUTSTANDING                   = 1h
CALL_PENDING                         = 2h
SESSION_ESTABLISHED                  = 3h
HANGUP_PENDING                       = 4h
HANGUP_COMPLETE                      = 5h
SESSION_ABORTED                      = 6h
NCBCALL                              = 10h
NCBLISTEN                            = 11h
NCBHANGUP                            = 12h
NCBSEND                              = 14h
NCBRECV                              = 15h
NCBRECVANY                           = 16h
NCBCHAINSEND                         = 17h
NCBDGSEND                            = 20h
NCBDGRECV                            = 21h
NCBDGSENDBC                          = 22h
NCBDGRECVBC                          = 23h
NCBADDNAME                           = 30h
NCBDELNAME                           = 31h
NCBRESET                             = 32h
NCBASTAT                             = 33h
NCBSSTAT                             = 34h
NCBCANCEL                            = 35h
NCBADDGRNAME                         = 36h
NCBENUM                              = 37h
NCBUNLINK                            = 70h
NCBSENDNA                            = 71h
NCBCHAINSENDNA                       = 72h
NCBLANSTALERT                        = 73h
NCBACTION                            = 77h
NCBFINDNAME                          = 78h
NCBTRACE                             = 79h
ASYNCH                               = 80h
NRC_GOODRET                          = 0h
NRC_BUFLEN                           = 1h
NRC_ILLCMD                           = 3h
NRC_CMDTMO                           = 5h
NRC_INCOMP                           = 6h
NRC_BADDR                            = 7h
NRC_SNUMOUT                          = 8h
NRC_NORES                            = 9h
NRC_SCLOSED                          = 0Ah
NRC_CMDCAN                           = 0Bh
NRC_DUPNAME                          = 0Dh
NRC_NAMTFUL                          = 0Eh
NRC_ACTSES                           = 0Fh
NRC_LOCTFUL                          = 11h
NRC_REMTFUL                          = 12h
NRC_ILLNN                            = 13h
NRC_NOCALL                           = 14h
NRC_NOWILD                           = 15h
NRC_INUSE                            = 16h
NRC_NAMERR                           = 17h
NRC_SABORT                           = 18h
NRC_NAMCONF                          = 19h
NRC_IFBUSY                           = 21h
NRC_TOOMANY                          = 22h
NRC_BRIDGE                           = 23h
NRC_CANOCCR                          = 24h
NRC_CANCEL                           = 26h
NRC_DUPENV                           = 30h
NRC_ENVNOTDEF                        = 34h
NRC_OSRESNOTAV                       = 35h
NRC_MAXAPPS                          = 36h
NRC_NOSAPS                           = 37h
NRC_NORESOURCES                      = 38h
NRC_INVADDRESS                       = 39h
NRC_INVDDID                          = 3Bh
NRC_LOCKFAIL                         = 3Ch
NRC_OPENERR                          = 3Fh
NRC_SYSTEM                           = 40h
NRC_PENDING                          = 0FFh
EXCEPTION_EXECUTE_HANDLER            = 1
EXCEPTION_CONTINUE_SEARCH            = 0
EXCEPTION_CONTINUE_EXECUTION         = -1
ctlFirst                             = 400h
ctlLast                              = 4FFh
psh1                                 = 400h
psh2                                 = 401h
psh3                                 = 402h
psh4                                 = 403h
psh5                                 = 404h
psh6                                 = 405h
psh7                                 = 406h
psh8                                 = 407h
psh9                                 = 408h
psh10                                = 409h
psh11                                = 40Ah
psh12                                = 40Bh
psh13                                = 40Ch
psh14                                = 40Dh
psh15                                = 40Eh
pshHelp                              = psh15
psh16                                = 40Fh
chx1                                 = 410h
chx2                                 = 411h
chx3                                 = 412h
chx4                                 = 413h
chx5                                 = 414h
chx6                                 = 415h
chx7                                 = 416h
chx8                                 = 417h
chx9                                 = 418h
chx10                                = 419h
chx11                                = 41Ah
chx12                                = 41Bh
chx13                                = 41Ch
chx14                                = 41Dh
chx15                                = 41Eh
chx16                                = 41Dh
rad1                                 = 420h
rad2                                 = 421h
rad3                                 = 422h
rad4                                 = 423h
rad5                                 = 424h
rad6                                 = 425h
rad7                                 = 426h
rad8                                 = 427h
rad9                                 = 428h
rad10                                = 429h
rad11                                = 42Ah
rad12                                = 42Bh
rad13                                = 42Ch
rad14                                = 42Dh
rad15                                = 42Eh
rad16                                = 42Fh
grp1                                 = 430h
grp2                                 = 431h
grp3                                 = 432h
grp4                                 = 433h
frm1                                 = 434h
frm2                                 = 435h
frm3                                 = 436h
frm4                                 = 437h
rct1                                 = 438h
rct2                                 = 439h
rct3                                 = 43Ah
rct4                                 = 43Bh
ico1                                 = 43Ch
ico2                                 = 43Dh
ico3                                 = 43Eh
ico4                                 = 43Fh
stc1                                 = 440h
stc2                                 = 441h
stc3                                 = 442h
stc4                                 = 443h
stc5                                 = 444h
stc6                                 = 445h
stc7                                 = 446h
stc8                                 = 447h
stc9                                 = 448h
stc10                                = 449h
stc11                                = 44Ah
stc12                                = 44Bh
stc13                                = 44Ch
stc14                                = 44Dh
stc15                                = 44Eh
stc16                                = 44Fh
stc17                                = 450h
stc18                                = 451h
stc19                                = 452h
stc20                                = 453h
stc21                                = 454h
stc22                                = 455h
stc23                                = 456h
stc24                                = 457h
stc25                                = 458h
stc26                                = 459h
stc27                                = 45Ah
stc28                                = 45Bh
stc29                                = 45Ch
stc30                                = 45Dh
stc31                                = 45Eh
stc32                                = 45Fh
lst1                                 = 460h
lst2                                 = 461h
lst3                                 = 462h
lst4                                 = 463h
lst5                                 = 464h
lst6                                 = 465h
lst7                                 = 466h
lst8                                 = 467h
lst9                                 = 468h
lst10                                = 469h
lst11                                = 46Ah
lst12                                = 46Bh
lst13                                = 46Ch
lst14                                = 46Dh
lst15                                = 46Eh
lst16                                = 46Fh
cmb1                                 = 470h
cmb2                                 = 471h
cmb3                                 = 472h
cmb4                                 = 473h
cmb5                                 = 474h
cmb6                                 = 475h
cmb7                                 = 476h
cmb8                                 = 477h
cmb9                                 = 478h
cmb10                                = 479h
cmb11                                = 47Ah
cmb12                                = 47Bh
cmb13                                = 47Ch
cmb14                                = 47Dh
cmb15                                = 47Eh
cmb16                                = 47Fh
edt1                                 = 480h
edt2                                 = 481h
edt3                                 = 482h
edt4                                 = 483h
edt5                                 = 484h
edt6                                 = 485h
edt7                                 = 486h
edt8                                 = 487h
edt9                                 = 488h
edt10                                = 489h
edt11                                = 48Ah
edt12                                = 48Bh
edt13                                = 48Ch
edt14                                = 48Dh
edt15                                = 48Eh
edt16                                = 48Fh
scr1                                 = 490h
scr2                                 = 491h
scr3                                 = 492h
scr4                                 = 493h
scr5                                 = 494h
scr6                                 = 495h
scr7                                 = 496h
scr8                                 = 497h
FILEOPENORD                          = 1536
MULTIFILEOPENORD                     = 1537
PRINTDLGORD                          = 1538
PRNSETUPDLGORD                       = 1539
FINDDLGORD                           = 1540
REPLACEDLGORD                        = 1541
FONTDLGORD                           = 1542
FORMATDLGORD31                       = 1543
FORMATDLGORD30                       = 1544
HKEY_CLASSES_ROOT                    = 80000000h
HKEY_CURRENT_USER                    = 80000001h
HKEY_LOCAL_MACHINE                   = 80000002h
HKEY_USERS                           = 80000003h
HKEY_PERFORMANCE_DATA                = 80000004h
HKEY_CURRENT_CONFIG                  = 80000005h
HKEY_DYN_DATA                        = 80000006h
SERVICE_NO_CHANGE                    = 0FFFFFFFFh
SERVICE_ACTIVE                       = 1h
SERVICE_INACTIVE                     = 2h
SERVICE_STATE_ALL                    = SERVICE_ACTIVE or SERVICE_INACTIVE
SERVICE_CONTROL_STOP                 = 1h
SERVICE_CONTROL_PAUSE                = 2h
SERVICE_CONTROL_CONTINUE             = 3h
SERVICE_CONTROL_INTERROGATE          = 4h
SERVICE_CONTROL_SHUTDOWN             = 5h
SERVICE_STOPPED                      = 1h
SERVICE_START_PENDING                = 2h
SERVICE_STOP_PENDING                 = 3h
SERVICE_RUNNING                      = 4h
SERVICE_CONTINUE_PENDING             = 5h
SERVICE_PAUSE_PENDING                = 6h
SERVICE_PAUSED                       = 7h
SERVICE_ACCEPT_STOP                  = 1h
SERVICE_ACCEPT_PAUSE_CONTINUE        = 2h
SERVICE_ACCEPT_SHUTDOWN              = 4h
SC_MANAGER_CONNECT                   = 1h
SC_MANAGER_CREATE_SERVICE            = 2h
SC_MANAGER_ENUMERATE_SERVICE         = 4h
SC_MANAGER_LOCK                      = 8h
SC_MANAGER_QUERY_LOCK_STATUS         = 10h
SC_MANAGER_MODIFY_BOOT_CONFIG        = 20h
SC_MANAGER_ALL_ACCESS                = STANDARD_RIGHTS_REQUIRED or SC_MANAGER_CONNECT or SC_MANAGER_CREATE_SERVICE or SC_MANAGER_ENUMERATE_SERVICE or SC_MANAGER_LOCK or SC_MANAGER_QUERY_LOCK_STATUS or SC_MANAGER_MODIFY_BOOT_CONFIG
SERVICE_QUERY_CONFIG                 = 1h
SERVICE_CHANGE_CONFIG                = 2h
SERVICE_QUERY_STATUS                 = 4h
SERVICE_ENUMERATE_DEPENDENTS         = 8h
SERVICE_START                        = 10h
SERVICE_STOP                         = 20h
SERVICE_PAUSE_CONTINUE               = 40h
SERVICE_INTERROGATE                  = 80h
SERVICE_USER_DEFINED_CONTROL         = 100h
SERVICE_ALL_ACCESS                   = STANDARD_RIGHTS_REQUIRED or SERVICE_QUERY_CONFIG or SERVICE_CHANGE_CONFIG or SERVICE_QUERY_STATUS or SERVICE_ENUMERATE_DEPENDENTS or SERVICE_START or SERVICE_STOP or SERVICE_PAUSE_CONTINUE or SERVICE_INTERROGATE or SERVICE_USER_DEFINED_CONTROL
PERF_DATA_VERSION                    = 1
PERF_DATA_REVISION                   = 1
PERF_NO_INSTANCES                    = -1
PERF_SIZE_DWORD                      = 0h
PERF_SIZE_LARGE                      = 100h
PERF_SIZE_ZERO                       = 200h
PERF_SIZE_VARIABLE_LEN               = 300h
PERF_TYPE_NUMBER                     = 0h
PERF_TYPE_COUNTER                    = 400h
PERF_TYPE_TEXT                       = 800h
PERF_TYPE_ZERO                       = 0C00h
PERF_NUMBER_HEX                      = 0h
PERF_NUMBER_DECIMAL                  = 10000h
PERF_NUMBER_DEC_1000                 = 20000h
PERF_COUNTER_VALUE                   = 0h
PERF_COUNTER_RATE                    = 10000h
PERF_COUNTER_FRACTION                = 20000h
PERF_COUNTER_BASE                    = 30000h
PERF_COUNTER_ELAPSED                 = 40000h
PERF_COUNTER_QUEUELEN                = 50000h
PERF_COUNTER_HISTOGRAM               = 60000h
PERF_TEXT_UNICODE                    = 0h
PERF_TEXT_ASCII                      = 10000h
PERF_TIMER_TICK                      = 0h
PERF_TIMER_100NS                     = 100000h
PERF_OBJECT_TIMER                    = 200000h
PERF_DELTA_COUNTER                   = 400000h
PERF_DELTA_BASE                      = 800000h
PERF_INVERSE_COUNTER                 = 1000000h
PERF_MULTI_COUNTER                   = 2000000h
PERF_DISPLAY_NO_SUFFIX               = 0h
PERF_DISPLAY_PER_SEC                 = 10000000h
PERF_DISPLAY_PERCENT                 = 20000000h
PERF_DISPLAY_SECONDS                 = 30000000h
PERF_DISPLAY_NOSHOW                  = 40000000h
PERF_COUNTER_COUNTER                 = PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_DISPLAY_PER_SEC
PERF_COUNTER_TIMER                   = PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_DISPLAY_PERCENT
PERF_COUNTER_QUEUELEN_TYPE           = PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_QUEUELEN or PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_DISPLAY_NO_SUFFIX
PERF_COUNTER_BULK_COUNT              = PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_DISPLAY_PER_SEC
PERF_COUNTER_TEXT                    = PERF_SIZE_VARIABLE_LEN or PERF_TYPE_TEXT or PERF_TEXT_UNICODE or PERF_DISPLAY_NO_SUFFIX
PERF_COUNTER_RAWCOUNT                = PERF_SIZE_DWORD or PERF_TYPE_NUMBER or PERF_NUMBER_DECIMAL or PERF_DISPLAY_NO_SUFFIX
PERF_SAMPLE_FRACTION                 = PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_FRACTION or PERF_DELTA_COUNTER or PERF_DELTA_BASE or PERF_DISPLAY_PERCENT
PERF_SAMPLE_COUNTER                  = PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_DISPLAY_NO_SUFFIX
PERF_COUNTER_NODATA                  = PERF_SIZE_ZERO or PERF_DISPLAY_NOSHOW
PERF_COUNTER_TIMER_INV               = PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or PERF_TIMER_TICK or PERF_DELTA_COUNTER or PERF_INVERSE_COUNTER or PERF_DISPLAY_PERCENT
PERF_SAMPLE_BASE                     = PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_BASE or PERF_DISPLAY_NOSHOW or 1h
PERF_AVERAGE_TIMER                   = PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_FRACTION or PERF_DISPLAY_SECONDS
PERF_AVERAGE_BASE                    = PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_BASE or PERF_DISPLAY_NOSHOW or 2h
PERF_AVERAGE_BULK                    = PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_FRACTION or PERF_DISPLAY_NOSHOW
PERF_100NSEC_TIMER                   = PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or PERF_TIMER_100NS or PERF_DELTA_COUNTER or PERF_DISPLAY_PERCENT
PERF_100NSEC_TIMER_INV               = PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or PERF_TIMER_100NS or PERF_DELTA_COUNTER or PERF_INVERSE_COUNTER or PERF_DISPLAY_PERCENT
PERF_COUNTER_MULTI_TIMER             = PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or PERF_DELTA_COUNTER or PERF_TIMER_TICK or PERF_MULTI_COUNTER or PERF_DISPLAY_PERCENT
PERF_COUNTER_MULTI_TIMER_INV         = PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_RATE or PERF_DELTA_COUNTER or PERF_MULTI_COUNTER or PERF_TIMER_TICK or PERF_INVERSE_COUNTER or PERF_DISPLAY_PERCENT
PERF_COUNTER_MULTI_BASE              = PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_BASE or PERF_MULTI_COUNTER or PERF_DISPLAY_NOSHOW
PERF_100NSEC_MULTI_TIMER             = PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_DELTA_COUNTER or PERF_COUNTER_RATE or PERF_TIMER_100NS or PERF_MULTI_COUNTER or PERF_DISPLAY_PERCENT
PERF_100NSEC_MULTI_TIMER_INV         = PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_DELTA_COUNTER or PERF_COUNTER_RATE or PERF_TIMER_100NS or PERF_MULTI_COUNTER or PERF_INVERSE_COUNTER or PERF_DISPLAY_PERCENT
PERF_RAW_FRACTION                    = PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_FRACTION or PERF_DISPLAY_PERCENT
PERF_RAW_BASE                        = PERF_SIZE_DWORD or PERF_TYPE_COUNTER or PERF_COUNTER_BASE or PERF_DISPLAY_NOSHOW or 3h
PERF_ELAPSED_TIME                    = PERF_SIZE_LARGE or PERF_TYPE_COUNTER or PERF_COUNTER_ELAPSED or PERF_OBJECT_TIMER or PERF_DISPLAY_SECONDS
PERF_COUNTER_HISTOGRAM_TYPE          = 80000000h
PERF_DETAIL_NOVICE                   = 100
PERF_DETAIL_ADVANCED                 = 200
PERF_DETAIL_EXPERT                   = 300
PERF_DETAIL_WIZARD                   = 400
PERF_NO_UNIQUE_ID                    = -1
LZERROR_BADINHANDLE                  = -1
LZERROR_BADOUTHANDLE                 = -2
LZERROR_READ                         = -3
LZERROR_WRITE                        = -4
LZERROR_PUBLICLOC                    = -5
LZERROR_GLOBLOCK                     = -6
LZERROR_BADVALUE                     = -7
LZERROR_UNKNOWNALG                   = -8
VK_PROCESSKEY                        = 0E5h
STYLE_DESCRIPTION_SIZE               = 32
WM_CONVERTREQUESTEX                  = 108h

WM_IME_REQUEST                        = 288h
WM_IME_STARTCOMPOSITION              = 10Dh
WM_IME_ENDCOMPOSITION                = 10Eh
WM_IME_COMPOSITION                   = 10Fh
WM_IME_KEYLAST                       = 10Fh
WM_IME_SETCONTEXT                    = 281h
WM_IME_NOTIFY                        = 282h
WM_IME_CONTROL                       = 283h
WM_IME_COMPOSITIONFULL               = 284h
WM_IME_SELECT                        = 285h
WM_IME_CHAR                          = 286h
WM_IME_KEYDOWN                       = 290h
WM_IME_KEYUP                         = 291h
IMC_GETCANDIDATEPOS                  = 7h
IMC_SETCANDIDATEPOS                  = 8h
IMC_GETCOMPOSITIONFONT               = 9h
IMC_SETCOMPOSITIONFONT               = 0Ah
IMC_GETCOMPOSITIONWINDOW             = 0Bh
IMC_SETCOMPOSITIONWINDOW             = 0Ch
IMC_GETSTATUSWINDOWPOS               = 0Fh
IMC_SETSTATUSWINDOWPOS               = 10h
IMC_CLOSESTATUSWINDOW                = 21h
IMC_OPENSTATUSWINDOW                 = 22h
NI_OPENCANDIDATE                     = 10h
NI_CLOSECANDIDATE                    = 11h
NI_SELECTCANDIDATESTR                = 12h
NI_CHANGECANDIDATELIST               = 13h
NI_FINALIZECONVERSIONRESULT          = 14h
NI_COMPOSITIONSTR                    = 15h
NI_SETCANDIDATE_PAGESTART            = 16h
NI_SETCANDIDATE_PAGESIZE             = 17h
ISC_SHOWUICANDIDATEWINDOW            = 1h
ISC_SHOWUICOMPOSITIONWINDOW          = 80000000h
ISC_SHOWUIGUIDELINE                  = 40000000h
ISC_SHOWUIALLCANDIDATEWINDOW         = 0Fh
ISC_SHOWUIALL                        = 0C000000Fh
CPS_COMPLETE                         = 1h
CPS_CONVERT                          = 2h
CPS_REVERT                           = 3h
CPS_CANCEL                           = 4h
IME_CHOTKEY_IME_NONIME_TOGGLE        = 10h
IME_CHOTKEY_SHAPE_TOGGLE             = 11h
IME_CHOTKEY_SYMBOL_TOGGLE            = 12h
IME_JHOTKEY_CLOSE_OPEN               = 30h
IME_KHOTKEY_SHAPE_TOGGLE             = 50h
IME_KHOTKEY_HANJACONVERT             = 51h
IME_KHOTKEY_ENGLISH                  = 52h
IME_THOTKEY_IME_NONIME_TOGGLE        = 70h
IME_THOTKEY_SHAPE_TOGGLE             = 71h
IME_THOTKEY_SYMBOL_TOGGLE            = 72h
IME_HOTKEY_DSWITCH_FIRST             = 100h
IME_HOTKEY_DSWITCH_LAST              = 11Fh
IME_ITHOTKEY_RESEND_RESULTSTR        = 200h
IME_ITHOTKEY_PREVIOUS_COMPOSITION    = 201h
IME_ITHOTKEY_UISTYLE_TOGGLE          = 202h
GCS_COMPREADSTR                      = 1h
GCS_COMPREADATTR                     = 2h
GCS_COMPREADCLAUSE                   = 4h
GCS_COMPSTR                          = 8h
GCS_COMPATTR                         = 10h
GCS_COMPCLAUSE                       = 20h
GCS_CURSORPOS                        = 80h
GCS_DELTASTART                       = 100h
GCS_RESULTREADSTR                    = 200h
GCS_RESULTREADCLAUSE                 = 400h
GCS_RESULTSTR                        = 800h
GCS_RESULTCLAUSE                     = 1000h
CS_INSERTCHAR                        = 2000h
CS_NOMOVECARET                       = 4000h
IME_PROP_AT_CARET                    = 10000h
IME_PROP_SPECIAL_UI                  = 20000h
IME_PROP_CANDLIST_START_FROM_1       = 40000h
IME_PROP_UNICODE                     = 80000h
UI_CAP_2700                          = 1h
UI_CAP_ROT90                         = 2h
UI_CAP_ROTANY                        = 4h
SCS_CAP_COMPSTR                      = 1h
SCS_CAP_MAKEREAD                     = 2h
SELECT_CAP_CONVERSION                = 1h
SELECT_CAP_SENTENCE                  = 2h
GGL_LEVEL                            = 1h
GGL_INDEX                            = 2h
GGL_STRING                           = 3h
GGL_PRIVATE                          = 4h
GL_LEVEL_NOGUIDELINE                 = 0h
GL_LEVEL_FATAL                       = 1h
GL_LEVEL_ERROR                       = 2h
GL_LEVEL_WARNING                     = 3h
GL_LEVEL_INFORMATION                 = 4h
GL_ID_UNKNOWN                        = 0h
GL_ID_NOMODULE                       = 1h
GL_ID_NODICTIONARY                   = 10h
GL_ID_CANNOTSAVE                     = 11h
GL_ID_NOCONVERT                      = 20h
GL_ID_TYPINGERROR                    = 21h
GL_ID_TOOMANYSTROKE                  = 22h
GL_ID_READINGCONFLICT                = 23h
GL_ID_INPUTREADING                   = 24h
GL_ID_INPUTRADICAL                   = 25h
GL_ID_INPUTCODE                      = 26h
GL_ID_INPUTSYMBOL                    = 27h
GL_ID_CHOOSECANDIDATE                = 28h
GL_ID_REVERSECONVERSION              = 29h
GL_ID_PRIVATE_FIRST                  = 8000h
GL_ID_PRIVATE_LAST                   = 0FFFFh
IGP_PROPERTY                         = 4h
IGP_CONVERSION                       = 8h
IGP_SENTENCE                         = 0Ch
IGP_UI                               = 10h
IGP_SETCOMPSTR                       = 14h
IGP_SELECT                           = 18h
SCS_SETSTR                           = GCS_COMPREADSTR or GCS_COMPSTR
SCS_CHANGEATTR                       = GCS_COMPREADATTR or GCS_COMPATTR
SCS_CHANGECLAUSE                     = GCS_COMPREADCLAUSE or GCS_COMPCLAUSE
ATTR_INPUT                           = 0h
ATTR_TARGET_CONVERTED                = 1h
ATTR_CONVERTED                       = 2h
ATTR_TARGET_NOTCONVERTED             = 3h
ATTR_INPUT_ERROR                     = 4h
CFS_DEFAULT                          = 0h
CFS_RECT                             = 1h
CFS_POINT                            = 2h
CFS_SCREEN                           = 4h
CFS_FORCE_POSITION                   = 20h
CFS_CANDIDATEPOS                     = 40h
CFS_EXCLUDE                          = 80h
GCL_CONVERSION                       = 1h
GCL_REVERSECONVERSION                = 2h
GCL_REVERSE_LENGTH                   = 3h
IME_CMODE_ALPHANUMERIC               = 0h
IME_CMODE_NATIVE                     = 1h
IME_CMODE_CHINESE                    = IME_CMODE_NATIVE
IME_CMODE_HANGEUL                    = IME_CMODE_NATIVE
IME_CMODE_JAPANESE                   = IME_CMODE_NATIVE
IME_CMODE_KATAKANA                   = 2h
IME_CMODE_LANGUAGE                   = 3h
IME_CMODE_FULLSHAPE                  = 8h
IME_CMODE_ROMAN                      = 10h
IME_CMODE_CHARCODE                   = 20h
IME_CMODE_HANJACONVERT               = 40h
IME_CMODE_SOFTKBD                    = 80h
IME_CMODE_NOCONVERSION               = 100h
IME_CMODE_EUDC                       = 200h
IME_CMODE_SYMBOL                     = 400h
IME_SMODE_NONE                       = 0h
IME_SMODE_PLAURALCLAUSE              = 1h
IME_SMODE_SINGLECONVERT              = 2h
IME_SMODE_AUTOMATIC                  = 4h
IME_SMODE_PHRASEPREDICT              = 8h
IME_CAND_UNKNOWN                     = 0h
IME_CAND_READ                        = 1h
IME_CAND_CODE                        = 2h
IME_CAND_MEANING                     = 3h
IME_CAND_RADICAL                     = 4h
IME_CAND_STROKE                      = 5h
IMN_CLOSESTATUSWINDOW                = 1h
IMN_OPENSTATUSWINDOW                 = 2h
IMN_CHANGECANDIDATE                  = 3h
IMN_CLOSECANDIDATE                   = 4h
IMN_OPENCANDIDATE                    = 5h
IMN_SETCONVERSIONMODE                = 6h
IMN_SETSENTENCEMODE                  = 7h
IMN_SETOPENSTATUS                    = 8h
IMN_SETCANDIDATEPOS                  = 9h
IMN_SETCOMPOSITIONFONT               = 0Ah
IMN_SETCOMPOSITIONWINDOW             = 0Bh
IMN_SETSTATUSWINDOWPOS               = 0Ch
IMN_GUIDELINE                        = 0Dh
IMN_PRIVATE                          = 0Eh
IMM_ERROR_NODATA                     = -1
IMM_ERROR_GENERAL                    = -2
IME_CONFIG_GENERAL                   = 1
IME_CONFIG_REGISTERWORD              = 2
IME_CONFIG_SELECTDICTIONARY          = 3
IME_ESC_QUERY_SUPPORT                = 3h
IME_ESC_RESERVED_FIRST               = 4h
IME_ESC_RESERVED_LAST                = 7FFh
IME_ESC_PRIVATE_FIRST                = 800h
IME_ESC_PRIVATE_LAST                 = 0FFFh
IME_ESC_SEQUENCE_TO_INTERNAL         = 1001h
IME_ESC_GET_EUDC_DICTIONARY          = 1003h
IME_ESC_SET_EUDC_DICTIONARY          = 1004h
IME_ESC_MAX_KEY                      = 1005h
IME_ESC_IME_NAME                     = 1006h
IME_ESC_SYNC_HOTKEY                  = 1007h
IME_ESC_HANJA_MODE                   = 1008h
IME_REGWORD_STYLE_EUDC               = 1h
IME_REGWORD_STYLE_USER_FIRST         = 80000000h
IME_REGWORD_STYLE_USER_LAST          = 0FFFFh
SOFTKEYBOARD_TYPE_T1                 = 1h
SOFTKEYBOARD_TYPE_C1                 = 2h
DIALOPTION_BILLING                   = 40h
DIALOPTION_QUIET                     = 80h
DIALOPTION_DIALTONE                  = 100h
MDMVOLFLAG_LOW                       = 1h
MDMVOLFLAG_MEDIUM                    = 2h
MDMVOLFLAG_HIGH                      = 4h
MDMVOL_LOW                           = 0h
MDMVOL_MEDIUM                        = 1h
MDMVOL_HIGH                          = 2h
MDMSPKRFLAG_OFF                      = 1h
MDMSPKRFLAG_DIAL                     = 2h
MDMSPKRFLAG_ON                       = 4h
MDMSPKRFLAG_CALLSETUP                = 8h
MDMSPKR_OFF                          = 0h
MDMSPKR_DIAL                         = 1h
MDMSPKR_ON                           = 2h
MDMSPKR_CALLSETUP                    = 3h
MDM_COMPRESSION                      = 1h
MDM_ERROR_CONTROL                    = 2h
MDM_FORCED_EC                        = 4h
MDM_CELLULAR                         = 8h
MDM_FLOWCONTROL_HARD                 = 10h
MDM_FLOWCONTROL_SOFT                 = 20h
MDM_CCITT_OVERRIDE                   = 40h
MDM_SPEED_ADJUST                     = 80h
MDM_TONE_DIAL                        = 100h
MDM_BLIND_DIAL                       = 200h
MDM_V23_OVERRIDE                     = 400h
ABM_NEW                              = 0h
ABM_REMOVE                           = 1h
ABM_QUERYPOS                         = 2h
ABM_SETPOS                           = 3h
ABM_GETSTATE                         = 4h
ABM_GETTASKBARPOS                    = 5h
ABM_ACTIVATE                         = 6h
ABM_GETAUTOHIDEBAR                   = 7h
ABM_SETAUTOHIDEBAR                   = 8h
ABM_WINDOWPOSCHANGED                 = 9h
ABN_STATECHANGE                      = 0h
ABN_POSCHANGED                       = 1h
ABN_FULLSCREENAPP                    = 2h
ABN_WINDOWARRANGE                    = 3h
ABS_AUTOHIDE                         = 1h
ABS_ALWAYSONTOP                      = 2h
ABE_LEFT                             = 0
ABE_TOP                              = 1
ABE_RIGHT                            = 2
ABE_BOTTOM                           = 3
EIRESID                              = -1
FO_MOVE                              = 1h
FO_COPY                              = 2h
FO_DELETE                            = 3h
FO_RENAME                            = 4h
FOF_MULTIDESTFILES                   = 1h
FOF_CONFIRMMOUSE                     = 2h
FOF_SILENT                           = 4h
FOF_RENAMEONCOLLISION                = 8h
FOF_NOCONFIRMATION                   = 10h
FOF_WANTMAPPINGHANDLE                = 20h
FOF_ALLOWUNDO                        = 40h
FOF_FILESONLY                        = 80h
FOF_SIMPLEPROGRESS                   = 100h
FOF_NOCONFIRMMKDIR                   = 200h
PO_DELETE                            = 13h
PO_RENAME                            = 14h
PO_PORTCHANGE                        = 20h
PO_REN_PORT                          = 34h
SE_ERR_FNF                           = 2
SE_ERR_PNF                           = 3
SE_ERR_ACCESSDENIED                  = 5
SE_ERR_OOM                           = 8
SE_ERR_DLLNOTFOUND                   = 32
SEE_MASK_CLASSNAME                   = 1h
SEE_MASK_CLASSKEY                    = 3h
SEE_MASK_IDLIST                      = 4h
SEE_MASK_INVOKEIDLIST                = 0Ch
SEE_MASK_ICON                        = 10h
SEE_MASK_HOTKEY                      = 20h
SEE_MASK_NOCLOSEPROCESS              = 40h
SEE_MASK_CONNECTNETDRV               = 80h
SEE_MASK_FLAG_DDEWAIT                = 100h
SEE_MASK_DOENVSUBST                  = 200h
SEE_MASK_FLAG_NO_UI                  = 400h
NIM_ADD                              = 0h
NIM_MODIFY                           = 1h
NIM_DELETE                           = 2h
NIF_MESSAGE                          = 1h
NIF_ICON                             = 2h
NIF_TIP                              = 4h
SHGFI_ICON                           = 100h
SHGFI_DISPLAYNAME                    = 200h
SHGFI_TYPENAME                       = 400h
SHGFI_ATTRIBUTES                     = 800h
SHGFI_ICONLOCATION                   = 1000h
SHGFI_EXETYPE                        = 2000h
SHGFI_SYSICONINDEX                   = 4000h
SHGFI_LINKOVERLAY                    = 8000h
SHGFI_SELECTED                       = 10000h
SHGFI_LARGEICON                      = 0h
SHGFI_SMALLICON                      = 1h
SHGFI_OPENICON                       = 2h
SHGFI_SHELLICONSIZE                  = 4h
SHGFI_PIDL                           = 8h
SHGFI_USEFILEATTRIBUTES              = 10h
SHGNLI_PIDL                          = 1h
SHGNLI_PREFIXNAME                    = 2h
VS_VERSION_INFO                      = 1
VS_USER_DEFINED                      = 100
VS_FFI_SIGNATURE                     = 0FEEF04BDh
VS_FFI_STRUCVERSION                  = 10000h
VS_FFI_FILEFLAGSMASK                 = 3Fh
VS_FF_DEBUG                          = 1h
VS_FF_PRERELEASE                     = 2h
VS_FF_PATCHED                        = 4h
VS_FF_PRIVATEBUILD                   = 8h
VS_FF_INFOINFERRED                   = 10h
VS_FF_SPECIALBUILD                   = 20h
VOS_UNKNOWN                          = 0h
VOS_DOS                              = 10000h
VOS_OS216                            = 20000h
VOS_OS232                            = 30000h
VOS_NT                               = 40000h
VOS__BASE                            = 0h
VOS__WINDOWS16                       = 1h
VOS__PM16                            = 2h
VOS__PM32                            = 3h
VOS__WINDOWS32                       = 4h
VOS_DOS_WINDOWS16                    = 10001h
VOS_DOS_WINDOWS32                    = 10004h
VOS_OS216_PM16                       = 20002h
VOS_OS232_PM32                       = 30003h
VOS_NT_WINDOWS32                     = 40004h
VFT_UNKNOWN                          = 0h
VFT_APP                              = 1h
VFT_DLL                              = 2h
VFT_DRV                              = 3h
VFT_FONT                             = 4h
VFT_VXD                              = 5h
VFT_STATIC_LIB                       = 7h
VFT2_UNKNOWN                         = 0h
VFT2_DRV_PRINTER                     = 1h
VFT2_DRV_KEYBOARD                    = 2h
VFT2_DRV_LANGUAGE                    = 3h
VFT2_DRV_DISPLAY                     = 4h
VFT2_DRV_MOUSE                       = 5h
VFT2_DRV_NETWORK                     = 6h
VFT2_DRV_SYSTEM                      = 7h
VFT2_DRV_INSTALLABLE                 = 8h
VFT2_DRV_SOUND                       = 9h
VFT2_DRV_COMM                        = 0Ah
VFT2_DRV_INPUTMETHOD                 = 0Bh
VFT2_FONT_RASTER                     = 1h
VFT2_FONT_VECTOR                     = 2h
VFT2_FONT_TRUETYPE                   = 3h
VFFF_ISSHAREDFILE                    = 1h
VFF_CURNEDEST                        = 1h
VFF_FILEINUSE                        = 2h
VFF_BUFFTOOSMALL                     = 4h
VIFF_FORCEINSTALL                    = 1h
VIFF_DONTDELETEOLD                   = 2h
VIF_TEMPFILE                         = 1h
VIF_MISMATCH                         = 2h
VIF_SRCOLD                           = 4h
VIF_DIFFLANG                         = 8h
VIF_DIFFCODEPG                       = 10h
VIF_DIFFTYPE                         = 20h
VIF_WRITEPROT                        = 40h
VIF_FILEINUSE                        = 80h
VIF_OUTOFSPACE                       = 100h
VIF_ACCESSVIOLATION                  = 200h
VIF_SHARINGVIOLATION                 = 400h
VIF_CANNOTCREATE                     = 800h
VIF_CANNOTDELETE                     = 1000h
VIF_CANNOTRENAME                     = 2000h
VIF_CANNOTDELETECUR                  = 4000h
VIF_OUTOFMEMORY                      = 8000h
VIF_CANNOTREADSRC                    = 10000h
VIF_CANNOTREADDST                    = 20000h
VIF_BUFFTOOSMALL                     = 40000h
PROCESS_HEAP_REGION                  = 1h
PROCESS_HEAP_UNCOMMITTED_RANGE       = 2h
PROCESS_HEAP_ENTRY_BUSY              = 4h
PROCESS_HEAP_ENTRY_MOVEABLE          = 10h
PROCESS_HEAP_ENTRY_DDESHARE          = 20h
SCS_32BIT_BINARY                     = 0
SCS_DOS_BINARY                       = 1
SCS_WOW_BINARY                       = 2
SCS_PIF_BINARY                       = 3
SCS_POSIX_BINARY                     = 4
SCS_OS216_BINARY                     = 5
LOGON32_LOGON_INTERACTIVE            = 2
LOGON32_LOGON_BATCH                  = 4
LOGON32_LOGON_SERVICE                = 5
LOGON32_PROVIDER_DEFAULT             = 0
LOGON32_PROVIDER_WINNT35             = 1
VER_PLATFORM_WIN32s                  = 0
VER_PLATFORM_WIN32_WINDOWS           = 1
VER_PLATFORM_WIN32_NT                = 2
AC_LINE_OFFLINE                      = 0h
AC_LINE_ONLINE                       = 1h
AC_LINE_BACKUP_POWER                 = 2h
AC_LINE_UNKNOWN                      = 0FFh
BATTERY_FLAG_HIGH                    = 1h
BATTERY_FLAG_LOW                     = 2h
BATTERY_FLAG_CRITICAL                = 4h
BATTERY_FLAG_CHARGING                = 8h
BATTERY_FLAG_NO_BATTERY              = 80h
BATTERY_FLAG_UNKNOWN                 = 0FFh
BATTERY_PERCENTAGE_UNKNOWN           = 0FFh
BATTERY_LIFE_UNKNOWN                 = 0FFFFh
CDM_FIRST                            = WM_USER + 100
CDM_LAST                             = WM_USER + 200
CDM_GETSPEC                          = CDM_FIRST + 0h
CDM_GETFILEPATH                      = CDM_FIRST + 1h
CDM_GETFOLDERPATH                    = CDM_FIRST + 2h
CDM_GETFOLDERIDLIST                  = CDM_FIRST + 3h
CDM_SETCONTROLTEXT                   = CDM_FIRST + 4h
CDM_HIDECONTROL                      = CDM_FIRST + 5h
CDM_SETDEFEXT                        = CDM_FIRST + 6h
SIMULATED_FONTTYPE                   = 8000h
PRINTER_FONTTYPE                     = 4000h
SCREEN_FONTTYPE                      = 2000h
BOLD_FONTTYPE                        = 100h
ITALIC_FONTTYPE                      = 200h
REGULAR_FONTTYPE                     = 400h
WM_PSD_PAGESETUPDLG                  = WM_USER
WM_PSD_FULLPAGERECT                  = WM_USER + 1
WM_PSD_MINMARGINRECT                 = WM_USER + 2
WM_PSD_MARGINRECT                    = WM_USER + 3
WM_PSD_GREEKTEXTRECT                 = WM_USER + 4
WM_PSD_ENVSTAMPRECT                  = WM_USER + 5
WM_PSD_YAFULLPAGERECT                = WM_USER + 6
PSD_DEFAULTMINMARGINS                = 0h
PSD_INWININIINTLMEASURE              = 0h
PSD_MINMARGINS                       = 1h
PSD_MARGINS                          = 2h
PSD_INTHOUSANDTHSOFINCHES            = 4h
PSD_INHUNDREDTHSOFMILLIMETERS        = 8h
PSD_DISABLEMARGINS                   = 10h
PSD_DISABLEPRINTER                   = 20h
PSD_NOWARNING                        = 80h
PSD_DISABLEORIENTATION               = 100h
PSD_RETURNDEFAULT                    = 400h
PSD_DISABLEPAPER                     = 200h
PSD_SHOWHELP                         = 800h
PSD_ENABLEPAGESETUPHOOK              = 2000h
PSD_ENABLEPAGESETUPTEMPLATE          = 8000h
PSD_ENABLEPAGESETUPTEMPLATEHANDLE    = 20000h
PSD_ENABLEPAGEPAINTHOOK              = 40000h
PSD_DISABLEPAGEPAINTING              = 80000h
NM_FIRST                             = 0-  0
NM_LAST                              = 0-99
DBG_CONTINUE                         = 00010002h
DBG_TERMINATE_THREAD                 = 40010003h
DBG_TERMINATE_PROCESS                = 40010004h
DBG_CONTROL_C                        = 40010005h
DBG_CONTROL_BREAK                    = 40010008h
DBG_EXCEPTION_NOT_HANDLED            = 80010001h
SIZE_OF_80387_REGISTERS   = 80
STATUS_WAIT_0             = 00000000h
STATUS_ABANDONED_WAIT_0   = 00000080h
STATUS_USER_APC           = 000000C0h
STATUS_TIMEOUT            = 00000102h
STATUS_PENDING            = 00000103h
STATUS_DATATYPE_MISALIGNMENT              = 80000002h
STATUS_BREAKPOINT         = 80000003h
STATUS_SINGLE_STEP        = 80000004h
STATUS_ACCESS_VIOLATION   = 0C0000005h
STATUS_IN_PAGE_ERROR      = 0C0000006h
STATUS_NO_MEMORY          = 0C0000017h
STATUS_ILLEGAL_INSTRUCTION                = 0C000001Dh
STATUS_NONCONTINUABLE_EXCEPTION           = 0C0000025h
STATUS_INVALID_DISPOSITION                = 0C0000026h
STATUS_ARRAY_BOUNDS_EXCEEDED              = 0C000008Ch
STATUS_FLOAT_DENORMAL_OPERAND             = 0C000008Dh
STATUS_FLOAT_DIVIDE_BY_ZERO               = 0C000008Eh
STATUS_FLOAT_INEXACT_RESULT               = 0C000008Fh
STATUS_FLOAT_INVALID_OPERATION            = 0C0000090h
STATUS_FLOAT_OVERFLOW     = 0C0000091h
STATUS_FLOAT_STACK_CHECK  = 0C0000092h
STATUS_FLOAT_UNDERFLOW    = 0C0000093h
STATUS_INTEGER_DIVIDE_BY_ZERO             = 0C0000094h
STATUS_INTEGER_OVERFLOW   = 0C0000095h
STATUS_PRIVILEGED_INSTRUCTION             = 0C0000096h
STATUS_STACK_OVERFLOW     = 0C00000FDh
STATUS_CONTROL_C_EXIT     = 0C000013Ah
WAIT_FAILED               = -1
WAIT_OBJECT_0             = STATUS_WAIT_0
WAIT_ABANDONED            = STATUS_ABANDONED_WAIT_0
WAIT_ABANDONED_0          = STATUS_ABANDONED_WAIT_0
WAIT_TIMEOUT              = STATUS_TIMEOUT
WAIT_IO_COMPLETION        = STATUS_USER_APC
STILL_ACTIVE              = STATUS_PENDING

EXCEPTION_CONTINUABLE     = 0
EXCEPTION_NONCONTINUABLE  = 1h
EXCEPTION_ACCESS_VIOLATION                = STATUS_ACCESS_VIOLATION
EXCEPTION_DATATYPE_MISALIGNMENT           = STATUS_DATATYPE_MISALIGNMENT
EXCEPTION_BREAKPOINT      = STATUS_BREAKPOINT
EXCEPTION_SINGLE_STEP     = STATUS_SINGLE_STEP
EXCEPTION_ARRAY_BOUNDS_EXCEEDED           = STATUS_ARRAY_BOUNDS_EXCEEDED
EXCEPTION_FLT_DENORMAL_OPERAND            = STATUS_FLOAT_DENORMAL_OPERAND
EXCEPTION_FLT_DIVIDE_BY_ZERO              = STATUS_FLOAT_DIVIDE_BY_ZERO
EXCEPTION_FLT_INEXACT_RESULT              = STATUS_FLOAT_INEXACT_RESULT
EXCEPTION_FLT_INVALID_OPERATION           = STATUS_FLOAT_INVALID_OPERATION
EXCEPTION_FLT_OVERFLOW    = STATUS_FLOAT_OVERFLOW
EXCEPTION_FLT_STACK_CHECK = STATUS_FLOAT_STACK_CHECK
EXCEPTION_FLT_UNDERFLOW   = STATUS_FLOAT_UNDERFLOW
EXCEPTION_INT_DIVIDE_BY_ZERO              = STATUS_INTEGER_DIVIDE_BY_ZERO
EXCEPTION_INT_OVERFLOW    = STATUS_INTEGER_OVERFLOW
EXCEPTION_ILLEGAL_INSTRUCTION     =  STATUS_ILLEGAL_INSTRUCTION
EXCEPTION_PRIV_INSTRUCTION                = STATUS_PRIVILEGED_INSTRUCTION
EXCEPTION_IN_PAGE_ERROR   = STATUS_IN_PAGE_ERROR
CONTEXT_i386              = 00010000h
CONTEXT_i486              = 00010000h
CONTEXT_CONTROL           = CONTEXT_i386 or 00000001h
CONTEXT_INTEGER           = CONTEXT_i386 or 00000002h
CONTEXT_SEGMENTS          = CONTEXT_i386 or 00000004h
CONTEXT_FLOATING_POINT    = CONTEXT_i386 or 00000008h
CONTEXT_DEBUG_REGISTERS   = CONTEXT_i386 or 00000010h
CONTEXT_FULL              = CONTEXT_CONTROL or CONTEXT_INTEGER or CONTEXT_SEGMENTS
PAGE_NOACCESS             = 1
PAGE_READONLY             = 2
PAGE_READWRITE            = 4
PAGE_WRITECOPY            = 8
PAGE_EXECUTE              = 10h
PAGE_EXECUTE_READ         = 20h
PAGE_EXECUTE_READWRITE    = 40h
PAGE_EXECUTE_WRITECOPY    = 80h
PAGE_GUARD                = 100h
PAGE_NOCACHE              = 200h
MEM_COMMIT                = 1000h
MEM_RESERVE               = 2000h
MEM_DECOMMIT              = 4000h
MEM_RELEASE               = 8000h
MEM_FREE                  = 10000h
MEM_PRIVATE               = 20000h
MEM_MAPPED                = 40000h
MEM_RESET                 = 80000h
MEM_TOP_DOWN              = 100000h
SEC_FILE                  = 800000h
SEC_IMAGE                 = 1000000h
SEC_RESERVE               = 4000000h
SEC_COMMIT                = 8000000h
SEC_NOCACHE               = 10000000h
MEM_IMAGE                 = SEC_IMAGE

IMAGE_DIRECTORY_ENTRY_EXPORT                =  0
IMAGE_DIRECTORY_ENTRY_IMPORT                =  1
IMAGE_DIRECTORY_ENTRY_RESOURCE              =  2
IMAGE_DIRECTORY_ENTRY_EXCEPTION             =  3
IMAGE_DIRECTORY_ENTRY_SECURITY              =  4
IMAGE_DIRECTORY_ENTRY_BASERELOC             =  5
IMAGE_DIRECTORY_ENTRY_DEBUG =  6
IMAGE_DIRECTORY_ENTRY_COPYRIGHT             =  7
IMAGE_DIRECTORY_ENTRY_GLOBALPTR             =  8
IMAGE_DIRECTORY_ENTRY_TLS   =  9
IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG           = 10
IMAGE_DIRECTORY_ENTRY_BOUND_IMPORT          = 11
IMAGE_DIRECTORY_ENTRY_IAT   = 12
IMAGE_NUMBEROF_DIRECTORY_ENTRIES            = 16
IMAGE_BITMAP                = 0
IMAGE_ICON                  = 1
IMAGE_CURSOR                = 2
IMAGE_ENHMETAFILE           = 3
PROCESSOR_INTEL_386         = 386
PROCESSOR_INTEL_486         = 486
PROCESSOR_INTEL_PENTIUM     = 586
PROCESSOR_MIPS_R4000        = 4000
PROCESSOR_ALPHA_21064       = 21064

TYPEDEF FXPT2DOT30, DWORD
TYPEDEF MMVERSION, DWORD
TYPEDEF SECURITY_CONTEXT_TRACKING_MODE,  BOOLEAN
MAX_JOYSTICKOEMVXDNAME = 260
TYPEDEF FOURCC, DWORD

LOAD_LIBRARY_AS_DATAFILE        = 2
LOAD_WITH_ALTERED_SEARCH_PATH   = 8

EVENT_MODIFY_STATE      = 2

LMA_ALPHA    = 2
LMA_COLORKEY = 1

;comment * -----------------------------------------

;Additional equates for win2k XP from "gunner" (Rob)

;        ----------------------------------------- *

COINIT_APARTMENTTHREADED        = 2
COINIT_MULTITHREADED            = 0
COINIT_DISABLE_OLE1DDE          = 4
COINIT_SPEED_OVER_MEMORY        = 8

REST_NONE                       = 00000000h
REST_NORUN                      = 00000001h
REST_NOCLOSE                    = 00000002h
REST_NOSAVESET                  = 00000004h
REST_NOFILEMENU                 = 00000008h
REST_NOSETFOLDERS               = 00000010h
REST_NOSETTASKBAR               = 00000020h
REST_NODESKTOP                  = 00000040h
REST_NOFIND                     = 00000080h
REST_NODRIVES                   = 00000100h
REST_NODRIVEAUTORUN             = 00000200h
REST_NODRIVETYPEAUTORUN         = 00000400h
REST_NONETHOOD                  = 00000800h
REST_STARTBANNER                = 00001000h
REST_RESTRICTRUN                = 00002000h
REST_NOPRINTERTABS              = 00004000h
REST_NOPRINTERDELETE            = 00008000h
REST_NOPRINTERADD               = 00010000h
REST_NOSTARTMENUSUBFOLDERS      = 00020000h
REST_MYDOCSONNET                = 00040000h
REST_NOEXITTODOS                = 00080000h
REST_ENFORCESHELLEXTSECURITY    = 00100000h
REST_LINKRESOLVEIGNORELINKINFO  = 00200000h
REST_NOCOMMONGROUPS             = 00400000h
REST_SEPARATEDESKTOPPROCESS     = 00800000h
REST_NOWEB                      = 01000000h
REST_NOTRAYCONTEXTMENU          = 02000000h
REST_NOVIEWCONTEXTMENU          = 04000000h
REST_NONETCONNECTDISCONNECT     = 08000000h
REST_STARTMENULOGOFF            = 10000000h
REST_NOSETTINGSASSIST           = 20000000h
REST_NOINTERNETICON             = 40000001h
REST_NORECENTDOCSHISTORY        = 40000002h
REST_NORECENTDOCSMENU           = 40000003h
REST_NOACTIVEDESKTOP            = 40000004h
REST_NOACTIVEDESKTOPCHANGES     = 40000005h
REST_NOFAVORITESMENU            = 40000006h
REST_CLEARRECENTDOCSONEXIT      = 40000007h
REST_CLASSICSHELL               = 40000008h
REST_NOCUSTOMIZEWEBVIEW         = 40000009h
REST_NOHTMLWALLPAPER            = 40000010h
REST_NOCHANGINGWALLPAPER        = 40000011h
REST_NODESKCOMP                 = 40000012h
REST_NOADDDESKCOMP              = 40000013h
REST_NODELDESKCOMP              = 40000014h
REST_NOCLOSEDESKCOMP            = 40000015h
REST_NOCLOSE_DRAGDROPBAND       = 40000016h
REST_NOMOVINGBAND               = 40000017h
REST_NOEDITDESKCOMP             = 40000018h
REST_NORESOLVESEARCH            = 40000019h
REST_NORESOLVETRACK             = 4000001Ah
REST_FORCECOPYACLWITHFILE       = 4000001Bh
REST_NOLOGO3CHANNELNOTIFY       = 4000001Ch
REST_NOFORGETSOFTWAREUPDATE     = 4000001Dh
REST_NOSETACTIVEDESKTOP         = 4000001Eh
REST_NOUPDATEWINDOWS            = 4000001Fh
REST_NOCHANGESTARMENU           = 40000020h
REST_NOFOLDEROPTIONS            = 40000021h
REST_HASFINDCOMPUTERS           = 40000022h
REST_INTELLIMENUS               = 40000023h
REST_RUNDLGMEMCHECKBOX          = 40000024h
REST_ARP_ShowPostSetup          = 40000025h
REST_NOCSC                      = 40000026h
REST_NOCONTROLPANEL             = 40000027h
REST_ENUMWORKGROUP              = 40000028h
REST_ARP_NOARP                  = 40000029h
REST_ARP_NOREMOVEPAGE           = 4000002Ah
REST_ARP_NOADDPAGE              = 4000002Bh
REST_ARP_NOWINSETUPPAGE         = 4000002Ch
REST_GREYMSIADS                 = 4000002Dh
REST_NOCHANGEMAPPEDDRIVELABEL   = 4000002Eh
REST_NOCHANGEMAPPEDDRIVECOMMENT = 4000002Fh
REST_MaxRecentDocs              = 40000030h
REST_NONETWORKCONNECTIONS       = 40000031h
REST_FORCESTARTMENULOGOFF       = 40000032h
REST_NOWEBVIEW                  = 40000033h
REST_NOCUSTOMIZETHISFOLDER      = 40000034h
REST_NOENCRYPTION               = 40000035h
;  Do not use me                     40000036h
REST_DONTSHOWSUPERHIDDEN        = 40000037h
REST_NOSHELLSEARCHBUTTON        = 40000038h
REST_NOHARDWARETAB              = 40000039h
REST_NORUNASINSTALLPROMPT       = 4000003Ah
REST_PROMPTRUNASINSTALLNETPATH  = 4000003Bh
REST_NOMANAGEMYCOMPUTERVERB     = 4000003Ch
REST_NORECENTDOCSNETHOOD        = 4000003Dh
REST_DISALLOWRUN                = 4000003Eh
REST_NOWELCOMESCREEN            = 4000003Fh
REST_RESTRICTCPL                = 40000040h
REST_DISALLOWCPL                = 40000041h
REST_NOSMBALLOONTIP             = 40000042h
REST_NOSMHELP                   = 40000043h
REST_NOWINKEYS                  = 40000044h
REST_NOENCRYPTONMOVE            = 40000045h
REST_NOLOCALMACHINERUN          = 40000046h
REST_NOCURRENTUSERRUN           = 40000047h
REST_NOLOCALMACHINERUNONCE      = 40000048h
REST_NOCURRENTUSERRUNONCE       = 40000049h
REST_FORCEACTIVEDESKTOPON       = 4000004Ah
REST_NOCOMPUTERSNEARME          = 4000004Bh
REST_NOVIEWONDRIVE              = 4000004Ch
REST_NONETCRAWL                 = 4000004Dh
REST_NOSHAREDDOCUMENTS          = 4000004Eh
REST_NOSMMYDOCS                 = 4000004Fh
REST_NOSMMYPICS                 = 40000050h
REST_ALLOWBITBUCKDRIVES         = 40000051h
REST_NONLEGACYSHELLMODE         = 40000052h
REST_NOCONTROLPANELBARRICADE    = 40000053h
REST_NOSTARTPAGE                = 40000054h
REST_NOAUTOTRAYNOTIFY           = 40000055h
REST_NOTASKGROUPING             = 40000056h
REST_NOCDBURNING                = 40000057h
REST_MYCOMPNOPROP               = 40000058h
REST_MYDOCSNOPROP               = 40000059h
REST_NOSTARTPANEL               = 4000005Ah
REST_NODISPLAYAPPEARANCEPAGE    = 4000005Bh
REST_NOTHEMESTAB                = 4000005Ch
REST_NOVISUALSTYLECHOICE        = 4000005Dh
REST_NOSIZECHOICE               = 4000005Eh
REST_NOCOLORCHOICE              = 4000005Fh
REST_SETVISUALSTYLE             = 40000060h
REST_STARTRUNNOHOMEPATH         = 40000061h
REST_NOUSERNAMEINSTARTPANEL     = 40000062h
REST_NOMYCOMPUTERICON           = 40000063h
REST_NOSMNETWORKPLACES          = 40000064h
REST_NOSMPINNEDLIST             = 40000065h
REST_NOSMMYMUSIC                = 40000066h
REST_NOSMEJECTPC                = 40000067h
REST_NOSMMOREPROGRAMS           = 40000068h
REST_NOSMMFUPROGRAMS            = 40000069h
REST_NOTRAYITEMSDISPLAY         = 4000006Ah
REST_NOTOOLBARSONTASKBAR        = 4000006Bh
REST_NOSMCONFIGUREPROGRAMS      = 4000006Fh
REST_HIDECLOCK                  = 40000070h
REST_NOLOWDISKSPACECHECKS       = 40000071h
REST_NOENTIRENETWORK            = 40000072h
REST_NODESKTOPCLEANUP           = 40000073h
REST_BITBUCKNUKEONDELETE        = 40000074h
REST_BITBUCKCONFIRMDELETE       = 40000075h
REST_BITBUCKNOPROP              = 40000076h
REST_NODISPBACKGROUND           = 40000077h
REST_NODISPSCREENSAVEPG         = 40000078h
REST_NODISPSETTINGSPG           = 40000079h
REST_NODISPSCREENSAVEPREVIEW    = 4000007Ah
REST_NODISPLAYCPL               = 4000007Bh
REST_HIDERUNASVERB              = 4000007Ch
REST_NOTHUMBNAILCACHE           = 4000007Dh
REST_NOSTRCMPLOGICAL            = 4000007Eh
REST_NOPUBLISHWIZARD            = 4000007Fh
REST_NOONLINEPRINTSWIZARD       = 40000080h
REST_NOWEBSERVICES              = 40000081h
REST_ALLOWUNHASHEDWEBVIEW       = 40000082h
REST_ALLOWLEGACYWEBVIEW         = 40000083h
REST_REVERTWEBVIEWSECURITY      = 40000084h
REST_INHERITCONSOLEHANDLES      = 40000086h
REST_NODISCONNECT               = 41000001h
REST_NOSECURITY                 = 41000002h
REST_NOFILEASSOCIATE            = 41000003h


;;;; end equates

;;;; wingdi

; ************************* wingdi.h equates ******************************

NOMIRRORBITMAP                   = 80000000h
CAPTUREBLT                       = 40000000h
RGN_ERROR                        = ERROR
LAYOUT_RTL                       = 00000001h
LAYOUT_BTT                       = 00000002h
LAYOUT_VBH                       = 00000004h
LAYOUT_ORIENTATIONMASK           = (LAYOUT_RTL or LAYOUT_BTT or LAYOUT_VBH)
LAYOUT_BITMAPORIENTATIONPRESERVED = 00000008h
TA_RTLREADING                    = 256
ETO_GLYPH_INDEX                  = 0010h
ETO_RTLREADING                   = 0080h
ETO_NUMERICSLOCAL                = 0400h
ETO_NUMERICSLATIN                = 0800h
ETO_IGNORELANGUAGE               = 1000h
ETO_PDY                          = 2000h
META_SETLAYOUT                   = 0149h
ABORTDOC                         = 2
ENDDOC                           = 11
METAFILE_DRIVER                  = 2049
QUERYDIBSUPPORT                  = 3073
POSTSCRIPT_IDENTIFY              = 4117
POSTSCRIPT_INJECTION             = 4118
CHECKJPEGFORMAT                  = 4119
CHECKPNGFORMAT                   = 4120
GET_PS_FEATURESETTING            = 4121
SPCLPASSTHROUGH2                 = 4568
PSIDENT_GDICENTRIC               = 0
PSIDENT_PSCENTRIC                = 1
PSINJECT_BEGINSTREAM             = 1
PSINJECT_PSADOBE                 = 2
PSINJECT_PAGESATEND              = 3
PSINJECT_PAGES                   = 4
PSINJECT_DOCNEEDEDRES            = 5
PSINJECT_DOCSUPPLIEDRES          = 6
PSINJECT_PAGEORDER               = 7
PSINJECT_ORIENTATION             = 8
PSINJECT_BOUNDINGBOX             = 9
PSINJECT_DOCUMENTPROCESSCOLORS   = 10
PSINJECT_COMMENTS                = 11
PSINJECT_BEGINDEFAULTS           = 12
PSINJECT_ENDDEFAULTS             = 13
PSINJECT_BEGINPROLOG             = 14
PSINJECT_ENDPROLOG               = 15
PSINJECT_BEGINSETUP              = 16
PSINJECT_ENDSETUP                = 17
PSINJECT_TRAILER                 = 18
PSINJECT_EOF                     = 19
PSINJECT_ENDSTREAM               = 20
PSINJECT_DOCUMENTPROCESSCOLORSATEND = 21
PSINJECT_PAGENUMBER              = 100
PSINJECT_BEGINPAGESETUP          = 101
PSINJECT_ENDPAGESETUP            = 102
PSINJECT_PAGETRAILER             = 103
PSINJECT_PLATECOLOR              = 104
PSINJECT_SHOWPAGE                = 105
PSINJECT_PAGEBBOX                = 106
PSINJECT_ENDPAGECOMMENTS         = 107
PSINJECT_VMSAVE                  = 200
PSINJECT_VMRESTORE               = 201
FEATURESETTING_NUP               = 0
FEATURESETTING_OUTPUT            = 1
FEATURESETTING_PSLEVEL           = 2
FEATURESETTING_CUSTPAPER         = 3
FEATURESETTING_MIRROR            = 4
FEATURESETTING_NEGATIVE          = 5
FEATURESETTING_PROTOCOL          = 6
FEATURESETTING_PRIVATE_BEGIN     = 1000h
FEATURESETTING_PRIVATE_END       = 1FFFh
PSPROTOCOL_ASCII                 = 0
PSPROTOCOL_BCP                   = 1
PSPROTOCOL_TBCP                  = 2
PSPROTOCOL_BINARY                = 3
QDI_SETDIBITS                    = 1
QDI_GETDIBITS                    = 2
QDI_DIBTOSCREEN                  = 4
QDI_STRETCHDIB                   = 8
OBJ_COLORSPACE                   = 14
CS_ENABLE                        = 00000001h
CS_DISABLE                       = 00000002h
CS_DELETE_TRANSFORM              = 00000003h
LCS_SIGNATURE                    = 'PSOC'
LCS_sRGB                         = 'sRGB'
LCS_WINDOWS_COLOR_SPACE          = 'Win '
LCS_CALIBRATED_RGB               = 00000000h
LCS_GM_BUSINESS                  = 00000001h
LCS_GM_GRAPHICS                  = 00000002h
LCS_GM_IMAGES                    = 00000004h
LCS_GM_ABS_COLORIMETRIC          = 00000008h
CM_OUT_OF_GAMUT                  = 255
CM_IN_GAMUT                      = 0
ICM_ADDPROFILE                   = 1
ICM_DELETEPROFILE                = 2
ICM_QUERYPROFILE                 = 3
ICM_SETDEFAULTPROFILE            = 4
ICM_REGISTERICMATCHER            = 5
ICM_UNREGISTERICMATCHER          = 6
ICM_QUERYMATCH                   = 7
PROFILE_LINKED                   = 'LINK'
PROFILE_EMBEDDED                 = 'MBED'
BI_JPEG                          = 4
BI_PNG                           = 5
TCI_SRCLOCALE                    = 1000h
NTM_NONNEGATIVE_AC               = 00010000h
NTM_PS_OPENTYPE                  = 00020000h
NTM_TT_OPENTYPE                  = 00040000h
NTM_MULTIPLEMASTER               = 00080000h
NTM_TYPE1                        = 00100000h
NTM_DSIG                         = 00200000h
OUT_SCREEN_OUTLINE_PRECIS        = 9
OUT_PS_ONLY_PRECIS               = 10
NONANTIALIASED_QUALITY           = 3
ANTIALIASED_QUALITY              = 4
CLEARTYPE_QUALITY                = 5
CLEARTYPE_NATURAL_QUALITY        = 6
HANGUL_CHARSET                   = 129
VIETNAMESE_CHARSET               = 163
FS_VIETNAMESE                    = 00000100h
DC_BRUSH                         = 18
DC_PEN                           = 19
BS_MONOPATTERN                   = 9
VREFRESH                         = 116
DESKTOPVERTRES                   = 117
DESKTOPHORZRES                   = 118
BLTALIGNMENT                     = 119
SHADEBLENDCAPS                   = 120
COLORMGMTCAPS                    = 121
PC_POLYPOLYGON                   = 256
PC_PATHS                         = 512
SB_NONE                          = 00000000h
SB_CONST_ALPHA                   = 00000001h
SB_PIXEL_ALPHA                   = 00000002h
SB_PREMULT_ALPHA                 = 00000004h
SB_GRAD_RECT                     = 00000010h
SB_GRAD_TRI                      = 00000020h
CM_NONE                          = 00000000h
CM_DEVICE_ICM                    = 00000001h
CM_GAMMA_RAMP                    = 00000002h
CM_CMYK_COLOR                    = 00000004h
SYSPAL_NOSTATIC256               = 3
DM_POSITION                      = 00000020h
DM_NUP                           = 00000040h
DM_DISPLAYORIENTATION            = 00000080h
DM_LOGPIXELS                     = 00020000h
DM_BITSPERPEL                    = 00040000h
DM_PELSWIDTH                     = 00080000h
DM_PELSHEIGHT                    = 00100000h
DM_DISPLAYFLAGS                  = 00200000h
DM_DISPLAYFREQUENCY              = 00400000h
DM_PANNINGWIDTH                  = 08000000h
DM_PANNINGHEIGHT                 = 10000000h
DM_DISPLAYFIXEDOUTPUT            = 20000000h
DMPAPER_DBL_JAPANESE_POSTCARD    = 69
DMPAPER_A6                       = 70
DMPAPER_JENV_KAKU2               = 71
DMPAPER_JENV_KAKU3               = 72
DMPAPER_JENV_CHOU3               = 73
DMPAPER_JENV_CHOU4               = 74
DMPAPER_LETTER_ROTATED           = 75
DMPAPER_A3_ROTATED               = 76
DMPAPER_A4_ROTATED               = 77
DMPAPER_A5_ROTATED               = 78
DMPAPER_B4_JIS_ROTATED           = 79
DMPAPER_B5_JIS_ROTATED           = 80
DMPAPER_JAPANESE_POSTCARD_ROTATED = 81
DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED = 82
DMPAPER_A6_ROTATED               = 83
DMPAPER_JENV_KAKU2_ROTATED       = 84
DMPAPER_JENV_KAKU3_ROTATED       = 85
DMPAPER_JENV_CHOU3_ROTATED       = 86
DMPAPER_JENV_CHOU4_ROTATED       = 87
DMPAPER_B6_JIS                   = 88
DMPAPER_B6_JIS_ROTATED           = 89
DMPAPER_12X11                    = 90
DMPAPER_JENV_YOU4                = 91
DMPAPER_JENV_YOU4_ROTATED        = 92
DMPAPER_P16K                     = 93
DMPAPER_P32K                     = 94
DMPAPER_P32KBIG                  = 95
DMPAPER_PENV_1                   = 96
DMPAPER_PENV_2                   = 97
DMPAPER_PENV_3                   = 98
DMPAPER_PENV_4                   = 99
DMPAPER_PENV_5                   = 100
DMPAPER_PENV_6                   = 101
DMPAPER_PENV_7                   = 102
DMPAPER_PENV_8                   = 103
DMPAPER_PENV_9                   = 104
DMPAPER_PENV_10                  = 105
DMPAPER_P16K_ROTATED             = 106
DMPAPER_P32K_ROTATED             = 107
DMPAPER_P32KBIG_ROTATED          = 108
DMPAPER_PENV_1_ROTATED           = 109
DMPAPER_PENV_2_ROTATED           = 110
DMPAPER_PENV_3_ROTATED           = 111
DMPAPER_PENV_4_ROTATED           = 112
DMPAPER_PENV_5_ROTATED           = 113
DMPAPER_PENV_6_ROTATED           = 114
DMPAPER_PENV_7_ROTATED           = 115
DMPAPER_PENV_8_ROTATED           = 116
DMPAPER_PENV_9_ROTATED           = 117
DMPAPER_PENV_10_ROTATED          = 118
DMBIN_FORMSOURCE                 = 15
DMDO_DEFAULT                     = 0
DMDO_90                          = 1
DMDO_180                         = 2
DMDO_270                         = 3
DMDFO_DEFAULT                    = 0
DMDFO_STRETCH                    = 1
DMDFO_CENTER                     = 2
DMDISPLAYFLAGS_TEXTMODE          = 00000004h
DMNUP_SYSTEM                     = 1
DMNUP_ONEUP                      = 2
DMICM_COLORIMETRIC               = 3
DMICM_ABS_COLORIMETRIC           = 4
DMDITHER_ERRORDIFFUSION          = 5
DMDITHER_RESERVED6               = 6
DMDITHER_RESERVED7               = 7
DMDITHER_RESERVED8               = 8
DMDITHER_RESERVED9               = 9
DISPLAY_DEVICE_ATTACHED_TO_DESKTOP = 00000001h
DISPLAY_DEVICE_MULTI_DRIVER      = 00000002h
DISPLAY_DEVICE_PRIMARY_DEVICE    = 00000004h
DISPLAY_DEVICE_MIRRORING_DRIVER  = 00000008h
DISPLAY_DEVICE_VGA_COMPATIBLE    = 00000010h
DISPLAY_DEVICE_REMOVABLE         = 00000020h
DISPLAY_DEVICE_MODESPRUNED       = 08000000h
DISPLAY_DEVICE_REMOTE            = 04000000h
DISPLAY_DEVICE_DISCONNECT        = 02000000h
DISPLAY_DEVICE_ACTIVE            = 00000001h
DISPLAY_DEVICE_ATTACHED          = 00000002h
SYSRGN                           = 4
GGO_BEZIER                       = 3
GGO_UNHINTED                     = 0100h
TT_PRIM_CSPLINE                  = 3
GCPCLASS_POSTBOUNDLTR            = 20h
GCPCLASS_POSTBOUNDRTL            = 10h
GCPGLYPH_LINKBEFORE              = 8000h
GCPGLYPH_LINKAFTER               = 4000h
PFD_TYPE_RGBA                    = 0
PFD_TYPE_COLORINDEX              = 1
PFD_MAIN_PLANE                   = 0
PFD_OVERLAY_PLANE                = 1
PFD_UNDERLAY_PLANE               = (-1)
PFD_DOUBLEBUFFER                 = 00000001h
PFD_STEREO                       = 00000002h
PFD_DRAW_TO_WINDOW               = 00000004h
PFD_DRAW_TO_BITMAP               = 00000008h
PFD_SUPPORT_GDI                  = 00000010h
PFD_SUPPORT_OPENGL               = 00000020h
PFD_GENERIC_FORMAT               = 00000040h
PFD_NEED_PALETTE                 = 00000080h
PFD_NEED_SYSTEM_PALETTE          = 00000100h
PFD_SWAP_EXCHANGE                = 00000200h
PFD_SWAP_COPY                    = 00000400h
PFD_SWAP_LAYER_BUFFERS           = 00000800h
PFD_GENERIC_ACCELERATED          = 00001000h
PFD_SUPPORT_DIRECTDRAW           = 00002000h
PFD_DEPTH_DONTCARE               = 20000000h
PFD_DOUBLEBUFFER_DONTCARE        = 40000000h
PFD_STEREO_DONTCARE              = 80000000h
DC_MANUFACTURER                  = 23
DC_MODEL                         = 24
DC_PERSONALITY                   = 25
DC_PRINTRATE                     = 26
DC_PRINTRATEUNIT                 = 27
PRINTRATEUNIT_PPM                = 1
PRINTRATEUNIT_CPS                = 2
PRINTRATEUNIT_LPM                = 3
PRINTRATEUNIT_IPM                = 4
DC_PRINTERMEM                    = 28
DC_MEDIAREADY                    = 29
DC_STAPLE                        = 30
DC_PRINTRATEPPM                  = 31
DC_COLORDEVICE                   = 32
DC_NUP                           = 33
DC_MEDIATYPENAMES                = 34
DC_MEDIATYPES                    = 35
GS_8BIT_INDICES                  = 00000001h
GGI_MARK_NONEXISTING_GLYPHS      = 0001h
MM_MAX_NUMAXES                   = 16
FR_PRIVATE                       = 10h
FR_NOT_ENUM                      = 20h
MM_MAX_AXES_NAMELEN              = 16
AC_SRC_OVER                      = 00h
AC_SRC_ALPHA                     = 01h
GRADIENT_FILL_RECT_H             = 00000000h
GRADIENT_FILL_RECT_V             = 00000001h
GRADIENT_FILL_TRIANGLE           = 00000002h
GRADIENT_FILL_OP_FLAG            = 000000ffh
DI_APPBANDING                    = 00000001h
DI_ROPS_READ_DESTINATION         = 00000002h
ICM_DONE_OUTSIDEDC               = 4
EMR_GLSRECORD                    = 102
EMR_GLSBOUNDEDRECORD             = 103
EMR_PIXELFORMAT                  = 104
EMR_RESERVED_105                 = 105
EMR_RESERVED_106                 = 106
EMR_RESERVED_107                 = 107
EMR_RESERVED_108                 = 108
EMR_RESERVED_109                 = 109
EMR_RESERVED_110                 = 110
EMR_COLORCORRECTPALETTE          = 111
EMR_SETICMPROFILEA               = 112
EMR_SETICMPROFILEW               = 113
EMR_ALPHABLEND                   = 114
EMR_SETLAYOUT                    = 115
EMR_TRANSPARENTBLT               = 116
EMR_RESERVED_117                 = 117
EMR_GRADIENTFILL                 = 118
EMR_RESERVED_119                 = 119
EMR_RESERVED_120                 = 120
EMR_COLORMATCHTOTARGETW          = 121
EMR_CREATECOLORSPACEW            = 122
SETICMPROFILE_EMBEDED            = 00000001h
CREATECOLORSPACE_EMBEDED         = 00000001h
COLORMATCHTOTARGET_EMBEDED       = 00000001h
GDICOMMENT_IDENTIFIER            = 43494447h
GDICOMMENT_WINDOWS_METAFILE      = 80000001h
GDICOMMENT_BEGINGROUP            = 00000002h
GDICOMMENT_ENDGROUP              = 00000003h
GDICOMMENT_MULTIFORMATS          = 40000004h
EPS_SIGNATURE                    = 46535045h
GDICOMMENT_UNICODE_STRING        = 00000040h
GDICOMMENT_UNICODE_END           = 00000080h
WGL_FONT_LINES                   = 0
WGL_FONT_POLYGONS                = 1
LPD_DOUBLEBUFFER                 = 00000001h
LPD_STEREO                       = 00000002h
LPD_SUPPORT_GDI                  = 00000010h
LPD_SUPPORT_OPENGL               = 00000020h
LPD_SHARE_DEPTH                  = 00000040h
LPD_SHARE_STENCIL                = 00000080h
LPD_SHARE_ACCUM                  = 00000100h
LPD_SWAP_EXCHANGE                = 00000200h
LPD_SWAP_COPY                    = 00000400h
LPD_TRANSPARENT                  = 00001000h
LPD_TYPE_RGBA                    = 0
LPD_TYPE_COLORINDEX              = 1
WGL_SWAP_MAIN_PLANE              = 00000001h
WGL_SWAP_OVERLAY1                = 00000002h
WGL_SWAP_OVERLAY2                = 00000004h
WGL_SWAP_OVERLAY3                = 00000008h
WGL_SWAP_OVERLAY4                = 00000010h
WGL_SWAP_OVERLAY5                = 00000020h
WGL_SWAP_OVERLAY6                = 00000040h
WGL_SWAP_OVERLAY7                = 00000080h
WGL_SWAP_OVERLAY8                = 00000100h
WGL_SWAP_OVERLAY9                = 00000200h
WGL_SWAP_OVERLAY10               = 00000400h
WGL_SWAP_OVERLAY11               = 00000800h
WGL_SWAP_OVERLAY12               = 00001000h
WGL_SWAP_OVERLAY13               = 00002000h
WGL_SWAP_OVERLAY14               = 00004000h
WGL_SWAP_OVERLAY15               = 00008000h
WGL_SWAP_UNDERLAY1               = 00010000h
WGL_SWAP_UNDERLAY2               = 00020000h
WGL_SWAP_UNDERLAY3               = 00040000h
WGL_SWAP_UNDERLAY4               = 00080000h
WGL_SWAP_UNDERLAY5               = 00100000h
WGL_SWAP_UNDERLAY6               = 00200000h
WGL_SWAP_UNDERLAY7               = 00400000h
WGL_SWAP_UNDERLAY8               = 00800000h
WGL_SWAP_UNDERLAY9               = 01000000h
WGL_SWAP_UNDERLAY10              = 02000000h
WGL_SWAP_UNDERLAY11              = 04000000h
WGL_SWAP_UNDERLAY12              = 08000000h
WGL_SWAP_UNDERLAY13              = 10000000h
WGL_SWAP_UNDERLAY14              = 20000000h
WGL_SWAP_UNDERLAY15              = 40000000h
WGL_SWAPMULTIPLE_MAX             = 16

ERROR                            = 0
STARTDOC                         = 10
SETMITERLIMIT                    = 23
EXTTEXTOUT                       = 512
STRETCHBLT                       = 2048

ETO_REVERSE_INDEX_MAP            = 10000h
GDIPLUS_TS_QUERYVER              = 4122
GDIPLUS_TS_RECORD                = 4123
MILCORE_TS_QUERYVER_RESULT_FALSE = 0h
MILCORE_TS_QUERYVER_RESULT_TRUE  = 7FFFFFFFh
DISPLAY_DEVICE_TS_COMPATIBLE     = 00200000h
DISPLAY_DEVICE_UNSAFE_MODES_ON   = 00080000h
PFD_DIRECT3D_ACCELERATED         = 00004000h
PFD_SUPPORT_COMPOSITION          = 00008000h
GDIREGISTERDDRAWPACKETVERSION    = 1h


;;;; end wingdi

;;;; win32st

POINT struct
  x  DWORD ?
  y  DWORD ?
POINT ends

POINTL struct
  x  DWORD ?
  y  DWORD ?
POINTL ends

POINTS struct
  x WORD ?
  y WORD ?
POINTS ends

RECT struct
  left    dd      ?
  top     dd      ?
  right   dd      ?
  bottom  dd      ?
RECT ends

SIZEL struct
  x  DWORD      ?
  y  DWORD      ?
SIZEL ends

_SIZE struct
  x  DWORD      ?
  y  DWORD      ?
_SIZE ends

MSG struct
  hwnd      DWORD      ?
  message   DWORD      ?
  wParam    DWORD      ?
  lParam    DWORD      ?
  time      DWORD      ?
  pt        POINT      <>
MSG ends

SID_AND_ATTRIBUTES struct
  Sid           DWORD      ?
  Attributes    DWORD      ?
SID_AND_ATTRIBUTES ends

SID_IDENTIFIER_AUTHORITY struct
  Value  BYTE     6 dup(?)
SID_IDENTIFIER_AUTHORITY ends

OVERLAPPED struct
  Internal      DWORD      ?
  InternalHigh  DWORD      ?
  loffset       DWORD      ?
  OffsetHigh    DWORD      ?
  hEvent        DWORD      ?
OVERLAPPED ends

SECURITY_ATTRIBUTES struct
  nLength              DWORD      ?
  lpSecurityDescriptor  DWORD      ?
  bInheritHandle        DWORD      ?
SECURITY_ATTRIBUTES ends

PROCESS_INFORMATION struct
  hProcess      DWORD      ?
  hThread       DWORD      ?
  dwProcessId   DWORD      ?
  dwThreadId    DWORD      ?
PROCESS_INFORMATION ends

FILETIME struct
  dwLowDateTime     DWORD     ?
  dwHighDateTime    DWORD     ?
FILETIME ends

SYSTEMTIME struct
  wYear             WORD      ?
  wMonth            WORD      ?
  wDayOfWeek        WORD      ?
  wDay              WORD      ?
  wHour             WORD      ?
  wMinute           WORD      ?
  wSecond           WORD      ?
  wMilliseconds     WORD      ?
SYSTEMTIME ends

COMMPROP struct
  wPacketiLength        WORD    ?
  wPacketVersion        WORD    ?
  dwServiceMask         DWORD   ?
  dwReserved1           DWORD   ?
  dwMaxTxQueue          DWORD   ?
  dwMaxRxQueue          DWORD   ?
  dwMaxBaud             DWORD   ?
  dwProvSubType         DWORD   ?
  dwProvCapabilities    DWORD   ?
  dwSettableParams      DWORD   ?
  dwSettableBaud        DWORD   ?
  wSettableData         WORD    ?
  wSettableStopParity   WORD    ?
  dwCurrentTxQueue      DWORD   ?
  dwCurrentRxQueue      DWORD   ?
  dwProvSpec1           DWORD   ?
  dwProvSpec2           DWORD   ?
  wcProvChar            WORD    ?
COMMPROP ends

;COMRECORD RECORD fCtsHold:1, fDsrHold:1,fRlsdHold:1,fXoffHold:1,fXoffSent:1,fEof:1,fTxim:1,fReserved:25

COMSTAT struct
  comrec    DWORD ?;COMRECORD   <>
  cbInQue   DWORD ?
  cbOutQue  DWORD ?
COMSTAT ends

COMMTIMEOUTS struct
  ReadIntervalTimeout           DWORD      ?
  ReadTotalTimeoutMultiplier    DWORD      ?
  ReadTotalTimeoutConstant      DWORD      ?
  WriteTotalTimeoutMultiplier   DWORD      ?
  WriteTotalTimeoutConstant     DWORD      ?
COMMTIMEOUTS ends

SYSTEM_INFO struct
  wProcessorArchitecture        WORD       ?
  wReserved                     WORD       ?
  dwPageSize                    DWORD      ?
  lpMinimumApplicationAddress   DWORD      ?
  lpMaximumApplicationAddress   DWORD      ?
  dwActiveProcessorMask         DWORD      ?
  dwNumberOfProcessors          DWORD      ?
  dwProcessorType               DWORD      ?
  dwAllocationGranularity       DWORD      ?
  wProcessorLevel               WORD       ?
  wProcessorRevision            WORD       ?
SYSTEM_INFO ends

MEMORYSTATUS struct
  dwLength          DWORD      ?
  dwMemoryLoad      DWORD      ?
  dwTotalPhys       DWORD      ?
  dwAvailPhys       DWORD      ?
  dwTotalPageFile   DWORD      ?
  dwAvailPageFile   DWORD      ?
  dwTotalVirtual    DWORD      ?
  dwAvailVirtual    DWORD      ?
MEMORYSTATUS ends

TPMPARAMS struct
  cbSize        DWORD      ?
  rcExclude     RECT       <>
TPMPARAMS ends


GENERIC_MAPPING struct
  GenericRead       DWORD      ?
  GenericWrite      DWORD      ?
  GenericExecute    DWORD      ?
  GenericAll        DWORD      ?
GENERIC_MAPPING ends

LUID struct
  LowPart   DWORD      ?
  HighPart  DWORD      ?
LUID ends

ACL struct
  AclRevision   BYTE      ?
  Sbz1          BYTE      ?
  AclSize       WORD      ?
  AceCount      WORD      ?
  Sbz2          WORD      ?
ACL ends

ACE_HEADER struct
    AceType db ?
    AceFlags db ?
    AceSize dw ?
ACE_HEADER ends

ACCESS_ALLOWED_ACE struct
  Header    ACE_HEADER <>
  imask     DWORD      ?
  SidStart  DWORD      ?
ACCESS_ALLOWED_ACE ends

ACCESS_DENIED_ACE struct
  Header        ACE_HEADER <>
  imask         DWORD      ?
  SidStart      DWORD      ?
ACCESS_DENIED_ACE ends

SYSTEM_AUDIT_ACE struct
  Header    ACE_HEADER <>
  imask     DWORD      ?
  SidStart  DWORD      ?
SYSTEM_AUDIT_ACE ends

SYSTEM_ALARM_ACE struct
  Header    ACE_HEADER <>
  imask     DWORD      ?
  SidStart  DWORD      ?
SYSTEM_ALARM_ACE ends

ACL_REVISION_INFORMATION struct
  AclRevision  DWORD      ?
ACL_REVISION_INFORMATION ends

ACL_SIZE_INFORMATION struct
  AceCount          DWORD      ?
  AclBytesInUse     DWORD      ?
  AclBytesFree      DWORD      ?
ACL_SIZE_INFORMATION ends

SECURITY_DESCRIPTOR struct
  Revision  BYTE      ?
  Sbz1      BYTE      ?
  Control   WORD      ?
  Owner     DWORD      ?
  lGroup    DWORD      ?
  Sacl      DWORD      ?
  Dacl      DWORD      ?
SECURITY_DESCRIPTOR ends

LUID_AND_ATTRIBUTES struct
    Luid LUID <>
    Attributes dd ?
LUID_AND_ATTRIBUTES ends

PRIVILEGE_SET struct
  PrivilegeCount    DWORD      ?
  Control           DWORD      ?
  Privilege  LUID_AND_ATTRIBUTES ANYSIZE_ARRAY dup(<>)
PRIVILEGE_SET ends

EXCEPTION_RECORD struct
  ExceptionCode         DWORD      ?
  ExceptionFlags        DWORD      ?
  pExceptionRecord      DWORD      ?
  ExceptionAddress      DWORD      ?
  NumberParameters      DWORD      ?
  ExceptionInformation  DWORD EXCEPTION_MAXIMUM_PARAMETERS dup(?)
EXCEPTION_RECORD ends

EXCEPTION_DEBUG_INFO struct
  pExceptionRecord  EXCEPTION_RECORD
  dwFirstChance     DWORD      ?
EXCEPTION_DEBUG_INFO ends

CREATE_THREAD_DEBUG_INFO struct
  hThread               DWORD      ?
  lpThreadLocalBase     DWORD      ?
  lpStartAddress        DWORD      ?
CREATE_THREAD_DEBUG_INFO ends

CREATE_PROCESS_DEBUG_INFO struct
  hFile                 DWORD      ?
  hProcess              DWORD      ?
  hThread               DWORD      ?
  lpBaseOfImage         DWORD      ?
  dwDebugInfoFileOffset DWORD      ?
  nDebugInfoSize        DWORD      ?
  lpThreadLocalBase     DWORD      ?
  lpStartAddress        DWORD      ?
  lpImageName           DWORD      ?
  fUnicode              WORD      ?
CREATE_PROCESS_DEBUG_INFO ends

EXIT_THREAD_DEBUG_INFO struct
  dwExitCode  DWORD      ?
EXIT_THREAD_DEBUG_INFO ends

EXIT_PROCESS_DEBUG_INFO struct
  dwExitCode  DWORD      ?
EXIT_PROCESS_DEBUG_INFO ends

LOAD_DLL_DEBUG_INFO struct
  hFile                     DWORD      ?
  lpBaseOfDll               DWORD      ?
  dwDebugInfoFileOffset     DWORD      ?
  nDebugInfoSize            DWORD      ?
  lpImageName               DWORD      ?
  fUnicode                  WORD       ?
LOAD_DLL_DEBUG_INFO ends

UNLOAD_DLL_DEBUG_INFO struct
  lpBaseOfDll  DWORD      ?
UNLOAD_DLL_DEBUG_INFO ends

OUTPUT_DEBUG_STRING_INFO struct
  lpDebugStringData     DWORD      ?
  fUnicode              WORD      ?
  nDebugStringiLength   WORD      ?
OUTPUT_DEBUG_STRING_INFO ends

RIP_INFO struct
  dwError   DWORD      ?
  dwType    DWORD      ?
RIP_INFO ends

OFSTRUCT struct
  cBytes        BYTE      ?
  fFixedDisk    BYTE      ?
  nErrCode      WORD      ?
  Reserved1     WORD      ?
  Reserved2     WORD      ?
  szPathName    BYTE  OFS_MAXPATHNAME dup(?)
OFSTRUCT ends

WNDCLASSEX struct
  cbSize            DWORD      ?
  style             DWORD      ?
  lpfnWndProc       DWORD      ?
  cbClsExtra        DWORD      ?
  cbWndExtra        DWORD      ?
  hInstance         DWORD      ?
  hIcon             DWORD      ?
  hCursor           DWORD      ?
  hbrBackground     DWORD      ?
  lpszMenuName      DWORD      ?
  lpszClassName     DWORD      ?
  hIconSm           DWORD      ?
WNDCLASSEX ends

WNDCLASS struct
  style             DWORD      ?
  lpfnWndProc       DWORD      ?
  cbClsExtra        DWORD      ?
  cbWndExtra        DWORD      ?
  hInstance         DWORD      ?
  hIcon             DWORD      ?
  hCursor           DWORD      ?
  hbrBackground     DWORD      ?
  lpszMenuName      DWORD      ?
  lpszClassName     DWORD      ?
WNDCLASS ends

RTL_CRITICAL_SECTION struct
    DebugInfo       DWORD ?
    LockCount       LONG ?
    RecursionCount  LONG ?
    OwningThread    HANDLE ?
    LockSemaphore   HANDLE ?
    SpinCount       DWORD ?
RTL_CRITICAL_SECTION ends
TYPEDEF CRITICAL_SECTION, RTL_CRITICAL_SECTION

BY_HANDLE_FILE_INFORMATION struct
  dwFileAttributes      DWORD      ?
  ftCreationTime        FILETIME <>
  ftLastAccessTime      FILETIME <>
  ftLastWriteTime       FILETIME <>
  dwVolumeSerialNumber  DWORD      ?
  nFileSizeHigh         DWORD      ?
  nFileSizeLow          DWORD      ?
  nNumberOfLinks        DWORD      ?
  nFileIndexHigh        DWORD      ?
  nFileIndexLow         DWORD      ?
BY_HANDLE_FILE_INFORMATION ends

MEMORY_BASIC_INFORMATION struct
  BaseAddress       DWORD      ?
  AllocationBase    DWORD      ?
  AllocationProtect DWORD      ?
  RegionSize        DWORD      ?
  State             DWORD      ?
  Protect           DWORD      ?
  lType             DWORD      ?
MEMORY_BASIC_INFORMATION ends

EVENTLOGRECORD struct
  iLength               DWORD      ?
  Reserved              DWORD      ?
  RecordNumber          DWORD      ?
  TimeGenerated         DWORD      ?
  TimeWritten           DWORD      ?
  EventID               DWORD      ?
  EventType             WORD      ?
  NumStrings            WORD      ?
  EventCategory         WORD      ?
  ReservedFlags         WORD      ?
  ClosingRecordNumber   DWORD      ?
  StringOffset          DWORD      ?
  UserSidiLength        DWORD      ?
  UserSidOffset         DWORD      ?
  DataiLength           DWORD      ?
  DataOffset            DWORD      ?
EVENTLOGRECORD ends

TOKEN_GROUPS struct
  GroupCount    DWORD      ?
  Groups        SID_AND_ATTRIBUTES ANYSIZE_ARRAY dup(<>)
TOKEN_GROUPS ends

TOKEN_PRIVILEGES struct
  PrivilegeCount    DWORD      ?
  Privileges        LUID_AND_ATTRIBUTES ANYSIZE_ARRAY dup(<>)
TOKEN_PRIVILEGES ends

FLOATING_SAVE_AREA struct
  ControlWord   DWORD      ?
  StatusWord    DWORD      ?
  TagWord       DWORD      ?
  ErrorOffset   DWORD      ?
  ErrorSelector DWORD      ?
  DataOffset    DWORD      ?
  DataSelector  DWORD      ?
  RegisterArea  BYTE  SIZE_OF_80387_REGISTERS dup(?)
  Cr0NpxState   DWORD      ?
FLOATING_SAVE_AREA ends

CONTEXT struct
  ContextFlags  DWORD      ?
  iDr0          DWORD      ?
  iDr1          DWORD      ?
  iDr2          DWORD      ?
  iDr3          DWORD      ?
  iDr6          DWORD      ?
  iDr7          DWORD      ?
  FloatSave     FLOATING_SAVE_AREA <>
  regGs         DWORD      ?
  regFs         DWORD      ?
  regEs         DWORD      ?
  regDs         DWORD      ?
  regEdi        DWORD      ?
  regEsi        DWORD      ?
  regEbx        DWORD      ?
  regEdx        DWORD      ?
  regEcx        DWORD      ?
  regEax        DWORD      ?
  regEbp        DWORD      ?
  regEip        DWORD      ?
  regCs         DWORD      ?
  regFlag       DWORD      ?
  regEsp        DWORD      ?
  regSs         DWORD      ?
  ExtendedRegisters db MAXIMUM_SUPPORTED_EXTENSION dup(?)
CONTEXT ends

EXCEPTION_POINTERS struct
  pExceptionRecord  DWORD      ?
  ContextRecord     DWORD      ?
EXCEPTION_POINTERS ends

LDT_BYTES struct
  BaseMid  BYTE      ?
  Flags1   BYTE      ?
  Flags2   BYTE      ?
  BaseHi   BYTE      ?
LDT_BYTES ends

TIME_ZONE_INFORMATION struct
  Bias          DWORD       ?
  StandardName  WORD        32 dup(?)
  StandardDate  SYSTEMTIME  <>
  StandardBias  DWORD       ?
  DaylightName  WORD        32 dup(?)
  DaylightDate  SYSTEMTIME  <>
  DaylightBias  DWORD       ?
TIME_ZONE_INFORMATION ends

LARGE_INTEGER union
    struct
      LowPart  DWORD ?
      HighPart DWORD ?
    ends
  QuadPart QWORD ?
LARGE_INTEGER ends

WIN32_STREAM_ID struct
  dwStreamID            DWORD      ?
  dwStreamAttributes    DWORD      ?
  dwSize                LARGE_INTEGER <>
  dwStreamNameSize      DWORD      ?
  cStreamName           BYTE  ANYSIZE_ARRAY dup(?)
WIN32_STREAM_ID ends

STARTUPINFO struct
  cb              DWORD ?
  lpReserved      DWORD ?
  lpDesktop       DWORD ?
  lpTitle         DWORD ?
  dwX             DWORD ?
  dwY             DWORD ?
  dwXSize         DWORD ?
  dwYSize         DWORD ?
  dwXCountChars   DWORD ?
  dwYCountChars   DWORD ?
  dwFillAttribute DWORD ?
  dwFlags         DWORD ?
  wShowWindow     WORD ?
  cbReserved2     WORD ?
  lpReserved2     DWORD ?
  hStdInput       DWORD ?
  hStdOutput      DWORD ?
  hStdError       DWORD ?
STARTUPINFO ends

WIN32_FIND_DATA struct
   dwFileAttributes       DWORD ?
   ftCreationTime         FILETIME <>
   ftLastAccessTime       FILETIME <>
   ftLastWriteTime        FILETIME <>
   nFileSizeHigh          DWORD ?
   nFileSizeLow           DWORD ?
   dwReserved0            DWORD ?
   dwReserved1            DWORD ?
   cFileName              TCHAR MAX_PATH dup (?)
   cAlternateFileName     TCHAR 14 dup (?)
WIN32_FIND_DATA ends

CPINFO struct
  MaxCharSize   DWORD      ?
  DefaultChar   BYTE   MAX_DEFAULTCHAR dup(?)
  LeadByte      BYTE MAX_LEADBYTES dup(?)
CPINFO ends

NUMBERFMT struct
  NumDigits         DWORD      ?
  LeadingZero       DWORD      ?
  Grouping          DWORD      ?
  lpDecimalSep      DWORD      ?
  lpThousandSep     DWORD      ?
  NegativeOrder     DWORD      ?
NUMBERFMT ends

CURRENCYFMT struct
  NumDigits         DWORD      ?
  LeadingZero       DWORD      ?
  Grouping          DWORD      ?
  lpDecimalSep      DWORD      ?
  lpThousandSep     DWORD      ?
  NegativeOrder     DWORD      ?
  PositiveOrder     DWORD      ?
  lpCurrencySymbol  DWORD      ?
CURRENCYFMT ends

COORD struct
  x  WORD      ?
  y  WORD      ?
COORD ends

SMALL_RECT struct
  Left      WORD      ?
  Top       WORD      ?
  Right     WORD      ?
  Bottom    WORD      ?
SMALL_RECT ends

CHARTYPE union
 UnicodeChar    WORD ?
 AsciiChar      db ?
CHARTYPE ends

MOUSE_EVENT_RECORD struct
  dwMousePosition       COORD <>
  dwButtonState         DWORD      ?
  dwControlKeyState     DWORD      ?
  dwEventFlags          DWORD      ?
MOUSE_EVENT_RECORD ends

KEY_EVENT_RECORD struct
  bKeyDown          DWORD ?
  wRepeatCount      WORD ?
  wVirtualKeyCode   WORD ?
  wVirtualScanCode  WORD ?
  union
    UnicodeChar     WORD ?
    AsciiChar       BYTE ?
  ends
  dwControlKeyState DWORD ?
KEY_EVENT_RECORD ends

WINDOW_BUFFER_SIZE_RECORD struct
  dwSize  COORD <>
WINDOW_BUFFER_SIZE_RECORD ends

MENU_EVENT_RECORD struct
  dwCommandId  DWORD      ?
MENU_EVENT_RECORD ends

FOCUS_EVENT_RECORD struct
  bSetFocus  DWORD      ?
FOCUS_EVENT_RECORD ends

INPUT_RECORD struct
  EventType             WORD ?
  two_byte_alignment    WORD ?
  union
    KeyEvent                KEY_EVENT_RECORD            <>
    MouseEvent              MOUSE_EVENT_RECORD          <>
    WindowBufferSizeEvent   WINDOW_BUFFER_SIZE_RECORD   <>
    MenuEvent               MENU_EVENT_RECORD           <>
    FocusEvent              FOCUS_EVENT_RECORD          <>
  ends
INPUT_RECORD ends

CHAR_INFO struct
  Char          CHARTYPE <>
  Attributes    WORD      ?
CHAR_INFO ends

CONSOLE_SCREEN_BUFFER_INFO struct
  dwSize                COORD <>
  dwCursorPosition      COORD <>
  wAttributes           WORD      ?
  srWindow              SMALL_RECT <>
  dwMaximumWindowSize   COORD <>
CONSOLE_SCREEN_BUFFER_INFO ends

CONSOLE_CURSOR_INFO struct
  dwSize    DWORD      ?
  bVisible  DWORD      ?
CONSOLE_CURSOR_INFO ends

XFORM struct
  eM11  DWORD      ?
  eM12  DWORD      ?
  eM21  DWORD      ?
  eM22  DWORD      ?
  ex    DWORD      ?
  ey    DWORD      ?
XFORM ends

BITMAP struct
  bmType        DWORD       ?
  bmWidth       DWORD       ?
  bmHeight      DWORD       ?
  bmWidthBytes  DWORD       ?
  bmPlanes      WORD        ?
  bmBitsPixel   WORD        ?
  bmBits        DWORD       ?
BITMAP ends

RGBTRIPLE struct
  rgbtBlue      BYTE      ?
  rgbtGreen     BYTE      ?
  rgbtRed       BYTE      ?
RGBTRIPLE ends

RGBQUAD struct
  rgbBlue       BYTE      ?
  rgbGreen      BYTE      ?
  rgbRed        BYTE      ?
  rgbReserved   BYTE      ?
RGBQUAD ends

BITMAPCOREHEADER struct
  bcSize        DWORD      ?
  bcWidth       WORD      ?
  bcHeight      WORD      ?
  bcPlanes      WORD      ?
  bcBitCount    WORD      ?
BITMAPCOREHEADER ends

BITMAPINFOHEADER struct
  biSize            DWORD      ?
  biWidth           DWORD      ?
  biHeight          DWORD      ?
  biPlanes          WORD       ?
  biBitCount        WORD       ?
  biCompression     DWORD      ?
  biSizeImage       DWORD      ?
  biXPelsPerMeter   DWORD      ?
  biYPelsPerMeter   DWORD      ?
  biClrUsed         DWORD      ?
  biClrImportant    DWORD      ?
BITMAPINFOHEADER ends

BITMAPINFO struct
  bmiHeader  BITMAPINFOHEADER <>
  bmiColors  RGBQUAD <>
BITMAPINFO ends

BITMAPCOREINFO struct
  bmciHeader  BITMAPCOREHEADER <>
  bmciColors  RGBTRIPLE <>
BITMAPCOREINFO ends

BITMAPFILEHEADER struct
  bfType        WORD      ?
  bfSize        DWORD      ?
  bfReserved1   WORD      ?
  bfReserved2   WORD      ?
  bfOffBits     DWORD      ?
BITMAPFILEHEADER ends

HANDLETABLE struct
  objectHandle  DWORD      ?
HANDLETABLE ends

METARECORD struct
  rdSize        DWORD      ?
  rdFunction    WORD      ?
  rdParm1       WORD      ?
METARECORD ends

METAFILEPICT struct
  imm   DWORD      ?
  xExt  DWORD      ?
  yExt  DWORD      ?
  hMF   DWORD      ?
METAFILEPICT ends

METAHEADER struct
  mtType            WORD      ?
  mtHeaderSize      WORD      ?
  mtVersion         WORD      ?
  mtSize            DWORD     ?
  mtNoObjects       WORD      ?
  mtMaxRecord       DWORD     ?
  mtNoParameters    WORD      ?
METAHEADER ends

ENHMETARECORD struct
  iType   DWORD      ?
  nSize   DWORD      ?
  dParm1  DWORD      ?
ENHMETARECORD ends

RECTL struct
   left     LONG ?
   top      LONG ?
   right    LONG ?
   bottom   LONG ?
RECTL ends

ENHMETAHEADER struct
  iType             DWORD      ?
  nSize             DWORD      ?
  rclBounds         RECTL <>
  rclFrame          RECTL <>
  dSignature        DWORD      ?
  nVersion          DWORD      ?
  nBytes            DWORD      ?
  nRecords          DWORD      ?
  nHandles          WORD      ?
  sReserved         WORD      ?
  nDescription      DWORD      ?
  offDescription    DWORD      ?
  nPalEntries       DWORD ?
  szlDevice         SIZEL <>
  szlMillimeters    SIZEL <>
  cbPixelFormat     DWORD ?
  offPixelFormat    DWORD ?
  bOpenGL           DWORD ?
ENHMETAHEADER ends

TEXTMETRIC struct
  tmHeight              DWORD      ?
  tmAscent              DWORD      ?
  tmDescent             DWORD      ?
  tmInternalLeading     DWORD      ?
  tmExternalLeading     DWORD      ?
  tmAveCharWidth        DWORD      ?
  tmMaxCharWidth        DWORD      ?
  tmWeight              DWORD      ?
  tmOverhang            DWORD      ?
  tmDigitizedAspectX    DWORD      ?
  tmDigitizedAspectY    DWORD      ?
  tmFirstChar           TCHAR      ?
  tmLastChar            TCHAR      ?
  tmDefaultChar         TCHAR      ?
  tmBreakChar           TCHAR      ?
  tmItalic              BYTE      ?
  tmUnderlined          BYTE      ?
  tmStruckOut           BYTE      ?
  tmPitchAndFamily      BYTE      ?
  tmCharSet             BYTE      ?
TEXTMETRIC ends

NEWTEXTMETRIC struct
  tmHeight              DWORD      ?
  tmAscent              DWORD      ?
  tmDescent             DWORD      ?
  tmInternalLeading     DWORD      ?
  tmExternalLeading     DWORD      ?
  tmAveCharWidth        DWORD      ?
  tmMaxCharWidth        DWORD      ?
  tmWeight              DWORD      ?
  tmOverhang            DWORD      ?
  tmDigitizedAspectX    DWORD      ?
  tmDigitizedAspectY    DWORD      ?
  tmFirstChar           TCHAR      ?
  tmLastChar            TCHAR      ?
  tmDefaultChar         TCHAR      ?
  tmBreakChar           TCHAR      ?
  tmItalic              BYTE      ?
  tmUnderlined          BYTE      ?
  tmStruckOut           BYTE      ?
  tmPitchAndFamily      BYTE      ?
  tmCharSet             BYTE      ?
  ntmFlags              DWORD      ?
  ntmSizeEM             DWORD      ?
  ntmCellHeight         DWORD      ?
  ntmAveWidth           DWORD      ?
NEWTEXTMETRIC ends

PELARRAY struct
  paXCount  DWORD      ?
  paYCount  DWORD      ?
  paXExt    DWORD      ?
  paYExt    DWORD      ?
  paRGBs    BYTE      ?
PELARRAY ends

LOGBRUSH struct
  lbStyle  DWORD      ?
  lbColor  DWORD      ?
  lbHatch  DWORD      ?
LOGBRUSH ends

LOGPEN struct
  lopnStyle  DWORD      ?
  lopnWidth  POINT <>
  lopnColor  DWORD      ?
LOGPEN ends

EXTLOGPEN struct
  elpPenStyle       DWORD      ?
  elpWidth          DWORD      ?
  elpBrushStyle     DWORD      ?
  elpColor          DWORD      ?
  elpHatch          DWORD      ?
  elpNumEntries     DWORD      ?
  elpStyleEntry     DWORD      ?
EXTLOGPEN ends

PALETTEENTRY struct
  peRed     BYTE      ?
  peGreen   BYTE      ?
  peBlue    BYTE      ?
  peFlags   BYTE      ?
PALETTEENTRY ends

LOGPALETTE struct
  palVersion        WORD      ?
  palNumEntries     WORD      ?
  palPalEntry       PALETTEENTRY <>
LOGPALETTE ends

LOGFONT struct
  lfHeight          DWORD      ?
  lfWidth           DWORD      ?
  lfEscapement      DWORD      ?
  lfOrientation     DWORD      ?
  lfWeight          DWORD      ?
  lfItalic          BYTE      ?
  lfUnderline       BYTE      ?
  lfStrikeOut       BYTE      ?
  lfCharSet         BYTE      ?
  lfOutPrecision    BYTE      ?
  lfClipPrecision   BYTE      ?
  lfQuality         BYTE      ?
  lfPitchAndFamily  BYTE      ?
  lfFaceName        TCHAR LF_FACESIZE dup(?)
LOGFONT ends

NONCLIENTMETRICS struct
  cbSize            DWORD      ?
  iBorderWidth      DWORD      ?
  iScrollWidth      DWORD      ?
  iScrollHeight     DWORD      ?
  iCaptionWidth     DWORD      ?
  iCaptionHeight    DWORD      ?
  lfCaptionFont     LOGFONT <>
  iSMCaptionWidth   DWORD      ?
  iSMCaptionHeight  DWORD      ?
  lfSMCaptionFont   LOGFONT <>
  iMenuWidth        DWORD      ?
  iMenuHeight       DWORD      ?
  lfMenuFont        LOGFONT <>
  lfStatusFont      LOGFONT <>
  lfMessageFont     LOGFONT <>
NONCLIENTMETRICS ends

ENUMLOGFONT struct
  elfLogFont    LOGFONT  <>
  elfFullName   TCHAR      LF_FULLFACESIZE dup(?)
  elfStyle      TCHAR      LF_FACESIZE dup(?)
ENUMLOGFONT ends

PANOSE struct
  bFamilyType   BYTE      ?
  bSerifStyle   BYTE      ?
  bWeight       BYTE      ?
  bProportion   BYTE      ?
  bContrast     BYTE      ?
  bStrokeVariation  BYTE      ?
  bArmStyle     BYTE      ?
  bLetterform   BYTE      ?
  bMidline      BYTE      ?
  bXHeight      BYTE      ?
PANOSE ends

EXTLOGFONT struct
  elfLogFont    LOGFONT <>
  elfFullName   TCHAR     LF_FULLFACESIZE dup(?)
  elfStyle      TCHAR     LF_FACESIZE dup(?)
  elfVersion    DWORD      ?
  elfStyleSize  DWORD      ?
  elfMatch      DWORD      ?
  elfReserved   DWORD      ?
  elfVendorId   BYTE      ELF_VENDOR_SIZE dup(?)
  elfCulture    DWORD      ?
  elfPanose     PANOSE     <>
EXTLOGFONT ends

DEVMODE struct
  dmDeviceName      BYTE   CCHDEVICENAME dup(?)
  dmSpecVersion     WORD      ?
  dmDriverVersion   WORD      ?
  dmSize            WORD      ?
  dmDriverExtra     WORD      ?
  dmFields          DWORD      ?
  union
     struct
        dmOrientation dw ?
        dmPaperSize dw ?
        dmPaperLength dw ?
        dmPaperWidth dw ?
     ends
      dmPosition POINTL <>
  ends
  dmScale           WORD      ?
  dmCopies          WORD      ?
  dmDefaultSource   WORD      ?
  dmPrintQuality    WORD      ?
  dmColor           WORD      ?
  dmDuplex          WORD      ?
  dmYResolution     WORD      ?
  dmTTOption        WORD      ?
  dmCollate         WORD      ?
  dmFormName        BYTE CCHFORMNAME dup (?)
  dmLogPixels       WORD      ?
  dmBitsPerPel      DWORD      ?
  dmPelsWidth       DWORD      ?
  dmPelsHeight      DWORD      ?
  dmDisplayFlags    DWORD      ?
  dmDisplayFrequency  DWORD      ?
  dmICMMethod       DWORD ?
  dmICMIntent       DWORD ?
  dmMediaType       DWORD ?
  dmDitherType      DWORD ?
  dmReserved1       DWORD ?
  dmReserved2       DWORD ?
DEVMODE ends

RGNDATAHEADER struct
  dwSize    DWORD      ?
  iType     DWORD      ?
  nCount    DWORD      ?
  nRgnSize  DWORD      ?
  rcBound   RECT <>
RGNDATAHEADER ends

RGNDATA struct
  rdh       RGNDATAHEADER <>
  Buffer    BYTE      ?
RGNDATA ends

ABC struct
  abcA  DWORD      ?
  abcB  DWORD      ?
  abcC  DWORD      ?
ABC ends

ABCFLOAT struct
  abcfA  DWORD      ?
  abcfB  DWORD      ?
  abcfC  DWORD      ?
ABCFLOAT ends

OUTLINETEXTMETRIC struct
  otmSize                   DWORD      ?
  otmTextMetrics            TEXTMETRIC <>
  otmFiller                 BYTE       ?
  otmPanoseNumber           PANOSE     <>
  otmfsSelection            DWORD      ?
  otmfsType                 DWORD      ?
  otmsCharSlopeRise         DWORD      ?
  otmsCharSlopeRun          DWORD      ?
  otmItalicAngle            DWORD      ?
  otmEMSquare               DWORD      ?
  otmAscent                 DWORD      ?
  otmDescent                DWORD      ?
  otmLineGap                DWORD      ?
  otmsCapEmHeight           DWORD      ?
  otmsXHeight               DWORD      ?
  otmrcFontBox              RECT       <>
  otmMacAscent              DWORD      ?
  otmMacDescent             DWORD      ?
  otmMacLineGap             DWORD      ?
  otmusMinimumPPEM          DWORD      ?
  otmptSubscriptSize        POINT      <>
  otmptSubscriptOffset      POINT      <>
  otmptSuperscriptSize      POINT      <>
  otmptSuperscriptOffset    POINT      <>
  otmsStrikeoutSize         DWORD      ?
  otmsStrikeoutPosition     DWORD      ?
  otmsUnderscoreSize        DWORD      ?
  otmsUnderscorePosition    DWORD      ?
  otmpFamilyName            DWORD      ?
  otmpFaceName              DWORD      ?
  otmpStyleName             DWORD      ?
  otmpFullName              DWORD      ?
OUTLINETEXTMETRIC ends

POLYTEXT struct
  x         DWORD       ?
  y         DWORD       ?
  n         DWORD       ?
  lpStr     DWORD       ?
  uiFlags   DWORD       ?
  icl       RECT        <>
  pdx       DWORD       ?
POLYTEXT ends

FIXED struct
  fract  WORD      ?
  Value  WORD      ?
FIXED ends

MAT2 struct
  eM11  FIXED <>
  eM12  FIXED <>
  eM21  FIXED <>
  eM22  FIXED <>
MAT2 ends

GLYPHMETRICS struct
  gmBlackBoxX       DWORD       ?
  gmBlackBoxY       DWORD       ?
  gmptGlyphOrigin   POINT       <>
  gmCellIncX        WORD        ?
  gmCellIncY        WORD        ?
GLYPHMETRICS ends

POINTFX struct
  x  FIXED <>
  y  FIXED <>
POINTFX ends

TTPOLYCURVE struct
  wType     WORD      ?
  cpfx      WORD      ?
  apfx      POINTFX <>
TTPOLYCURVE ends

TTPOLYGONHEADER struct
  cb        DWORD      ?
  dwType    DWORD      ?
  pfxStart  POINTFX <>
TTPOLYGONHEADER ends

RASTERIZER_STATUS struct
  nSize         WORD      ?
  wFlags        WORD      ?
  nLanguageID   WORD      ?
RASTERIZER_STATUS ends

COLORADJUSTMENT struct
  caSize            WORD      ?
  caFlags           WORD      ?
  caIlluminantIndex WORD      ?
  caRedGamma        WORD      ?
  caGreenGamma      WORD      ?
  caBlueGamma       WORD      ?
  caReferenceBlack  WORD      ?
  caReferenceWhite  WORD      ?
  caContrast        WORD      ?
  caBrightness      WORD      ?
  caColorfulness    WORD      ?
  caRedGreenTint    WORD      ?
COLORADJUSTMENT ends

DOCINFO struct
  cbSize        DWORD       ?
  lpszDocName   DWORD       ?
  lpszOutput    DWORD       ?
  lpszDatatype  DWORD       ?
  fwType        DWORD       ?
DOCINFO ends

KERNINGPAIR struct
  wFirst        WORD       ?
  wSecond       WORD       ?
  iKernAmount   DWORD      ?
KERNINGPAIR ends

EMR struct
  iType  DWORD      ?
  nSize  DWORD      ?
EMR ends

EMRTEXT struct
  ptlReference  POINTL      <>
  nchars        DWORD       ?
  offString     DWORD       ?
  fOptions      DWORD       ?
  ircl          RECTL       <>
  offDx         DWORD       ?
EMRTEXT ends

EMRABORTPATH struct
  emr  EMR <>
EMRABORTPATH ends
TYPEDEF EMRBEGINPATH, EMRABORTPATH
TYPEDEF EMRENDPATH, EMRABORTPATH
TYPEDEF EMRCLOSEFIGURE, EMRABORTPATH
TYPEDEF EMRFLATTENPATH, EMRABORTPATH
TYPEDEF EMRWIDENPATH, EMRABORTPATH
TYPEDEF EMRSETMETARGN, EMRABORTPATH
TYPEDEF EMREMRSAVEDC, EMRABORTPATH
TYPEDEF EMRREALIZEPALETTE, EMRABORTPATH

EMRSELECTCLIPPATH struct
  emr       EMR         <>
  iMode     DWORD       ?
EMRSELECTCLIPPATH ends
TYPEDEF EMRSETBKMODE, EMRSELECTCLIPPATH
TYPEDEF EMRSETMAPMODE, EMRSELECTCLIPPATH
TYPEDEF EMRSETPOLYFILLMODE, EMRSELECTCLIPPATH
TYPEDEF EMRSETROP2, EMRSELECTCLIPPATH
TYPEDEF EMRSETSTRETCHBLTMODE, EMRSELECTCLIPPATH
TYPEDEF EMRSETTEXTALIGN, EMRSELECTCLIPPATH

EMRSETMITERLIMIT struct
   emr          EMR <>
   eMiterLimit  DWORD ?
EMRSETMITERLIMIT ends

EMRRESTOREDC struct
   emr          EMR <>
   iRelative    DWORD ?
EMRRESTOREDC ends

EMRSETARCDIRECTION struct
   emr              EMR <>
   iArcDirection    DWORD ?
EMRSETARCDIRECTION ends

EMRSETMAPPERFLAGS struct
   emr      EMR <>
   dwFlags  DWORD ?
EMRSETMAPPERFLAGS ends

EMRSETTEXTCOLOR struct
   emr      EMR <>
   crColor  COLORREF ?
EMRSETTEXTCOLOR ends
TYPEDEF EMRSETBKCOLOR, EMRSETTEXTCOLOR

EMRSELECTOBJECT struct
  emr       EMR <>
  ihObject  DWORD      ?
EMRSELECTOBJECT ends
TYPEDEF EMRDELETEOBJECT, EMRSELECTOBJECT

EMRSELECTCOLORSPACE struct
  emr   EMR <>
  ihCS  DWORD ?
EMRSELECTCOLORSPACE ends
TYPEDEF EMRDELETECOLORSPACE, EMRSELECTCOLORSPACE

EMRSELECTPALETTE struct
  emr       EMR <>
  ihPal     DWORD      ?
EMRSELECTPALETTE ends

EMRRESIZEPALETTE struct
  emr       EMR <>
  ihPal     DWORD      ?
  cEntries  DWORD      ?
EMRRESIZEPALETTE ends

EMRSETPALETTEENTRIES struct
  emr           EMR <>
  ihPal         DWORD      ?
  iStart        DWORD      ?
  cEntries      DWORD      ?
  aPalEntries   PALETTEENTRY <>
EMRSETPALETTEENTRIES ends

EMRSETCOLORADJUSTMENT struct
  emr               EMR <>
  ColorAdjustment   COLORADJUSTMENT <>
EMRSETCOLORADJUSTMENT ends

EMRGDICOMMENT struct
  emr       EMR <>
  cbData    DWORD      ?
  xData1    BYTE ?
EMRGDICOMMENT ends

EMREOF struct
  emr               EMR <>
  nPalEntries       DWORD      ?
  offPalEntries     DWORD      ?
  nSizeLast         DWORD      ?
EMREOF ends

EMRLINETO struct
  emr   EMR <>
  ptl   POINTL <>
EMRLINETO ends
TYPEDEF EMRMOVETOEX, EMRLINETO

EMROFFSETCLIPRGN struct
  emr           EMR <>
  ptlOffset     POINTL <>
EMROFFSETCLIPRGN ends

EMRFILLPATH struct
  emr           EMR <>
  rclBounds     RECTL <>
EMRFILLPATH ends
TYPEDEF EMRSTROKEANDFILLPATH, EMRFILLPATH
TYPEDEF EMRSTROKEPATH, EMRFILLPATH

EMREXCLUDECLIPRECT struct
  emr       EMR   <>
  rclClip   RECTL <>
EMREXCLUDECLIPRECT ends
TYPEDEF EMRINTERSECTCLIPRECT, EMREXCLUDECLIPRECT

EMRSETVIEWPORTORGEX struct
  emr           EMR    <>
  ptlOrigin     POINTL <>
EMRSETVIEWPORTORGEX ends
TYPEDEF EMRSETWINDOWORGEX, EMRSETVIEWPORTORGEX
TYPEDEF EMRSETBRUSHORGEX, EMRSETVIEWPORTORGEX

EMRSETVIEWPORTEXTEX struct
  emr           EMR <>
  szlExtent     SIZEL <>
EMRSETVIEWPORTEXTEX ends
TYPEDEF EMRSETWINDOWEXTEX, EMRSETVIEWPORTEXTEX

EMRSCALEVIEWPORTEXTEX struct
  emr       EMR         <>
  xNum      DWORD       ?
  xDenom    DWORD       ?
  yNum      DWORD       ?
  yDemon    DWORD       ?
EMRSCALEVIEWPORTEXTEX ends
TYPEDEF EMRSCALEWINDOWEXTEX, EMRSCALEVIEWPORTEXTEX

EMRSETWORLDTRANSFORM struct
  emr       EMR         <>
  xform     XFORM       <>
EMRSETWORLDTRANSFORM ends

EMRMODIFYWORLDTRANSFORM struct
  emr       EMR         <>
  xform     XFORM       <>
  iMode     DWORD       ?
EMRMODIFYWORLDTRANSFORM ends

EMRSETPIXELV struct
  emr       EMR         <>
  ptlPixel  POINTL      <>
  crColor   COLORREF    ?
EMRSETPIXELV ends

EMREXTFLOODFILL struct
  emr       EMR         <>
  ptlStart  POINTL      <>
  crColor   COLORREF    ?
  iMode     DWORD       ?
EMREXTFLOODFILL ends

EMRELLIPSE struct
  emr       EMR     <>
  rclBox    RECTL   <>
EMRELLIPSE ends
TYPEDEF EMRRECTANGLE, EMRELLIPSE

EMRROUNDRECT struct
  emr           EMR     <>
  rclBox        RECTL   <>
  szlCorner     SIZEL   <>
EMRROUNDRECT ends

EMRARC struct
  emr       EMR     <>
  rclBox    RECTL   <>
  ptlStart  POINTL  <>
  ptlEnd    POINTL  <>
EMRARC ends
TYPEDEF EMRARCTO, EMRARC
TYPEDEF EMRCHORD, EMRARC
TYPEDEF EMRPIE, EMRARC

EMRANGLEARC struct
  emr           EMR         <>
  ptlCenter     POINTL      <>
  nRadius       DWORD       ?
  eStartAngle   DWORD       ?
  eSweepAngle   DWORD       ?
EMRANGLEARC ends

EMRPOLYLINE struct
  emr           EMR <>
  rclBounds     RECTL <>
  cptl          DWORD      ?
  aptl          POINTL <>
EMRPOLYLINE ends
TYPEDEF EMRPOLYBEZIER, EMRPOLYLINE
TYPEDEF EMRPOLYGON, EMRPOLYLINE
TYPEDEF EMRPOLYBEZIERTO, EMRPOLYLINE

EMRPOLYLINE16 struct
  emr           EMR     <>
  rclBounds     RECTL   <>
  cpts          DWORD   ?
  apts          POINTS  <>
EMRPOLYLINE16 ends
TYPEDEF EMRPOLYBEZIER16, EMRPOLYLINE16
TYPEDEF EMRPOLYGON16, EMRPOLYLINE16
TYPEDEF EMRPLOYBEZIERTO16, EMRPOLYLINE16
TYPEDEF EMRPOLYLINETO16, EMRPOLYLINE16

EMRPOLYDRAW struct
  emr           EMR     <>
  rclBounds     RECTL   <>
  cptl          DWORD   ?
  aptl          POINTL  <>
  abTypes1      BYTE    ?
EMRPOLYDRAW ends

EMRPOLYDRAW16 struct
  emr       EMR     <>
  rclBounds RECTL   <>
  cpts      DWORD   ?
  apts      POINTS  <>
  abTypes   BYTE    ?
EMRPOLYDRAW16 ends

EMRPOLYPOLYLINE struct
  emr           EMR         <>
  rclBounds     RECTL       <>
  nPolys        DWORD       ?
  cptl          DWORD       ?
  aPolyCounts   DWORD       ?
  aptl          POINTL      <>
EMRPOLYPOLYLINE ends
TYPEDEF EMRPOLYPOLYGON, EMRPOLYPOLYLINE

EMRPOLYPOLYLINE16 struct
  emr           EMR         <>
  rclBounds     RECTL       <>
  nPolys        DWORD       ?
  cpts          DWORD       ?
  aPolyCounts   DWORD       ?
  apts          POINTS      <>
EMRPOLYPOLYLINE16 ends
TYPEDEF EMRPOLYPOLYGON16, EMRPOLYPOLYLINE16

EMRINVERTRGN struct
  emr           EMR         <>
  rclBounds     RECTL       <>
  cbRgnData     DWORD       ?
  RgnData       BYTE        ?
EMRINVERTRGN ends
TYPEDEF EMRPAINTRGN, EMRINVERTRGN

EMRFILLRGN struct
  emr           EMR       <>
  rclBounds     RECTL     <>
  cbRgnData     DWORD      ?
  ihBrush       DWORD      ?
  RgnData       BYTE       ?
EMRFILLRGN ends

EMRFRAMERGN struct
  emr           EMR         <>
  rclBounds     RECTL       <>
  cbRgnData     DWORD       ?
  ihBrush       DWORD       ?
  szlStroke     SIZEL       <>
  RgnData       BYTE        ?
EMRFRAMERGN ends

EMREXTSELECTCLIPRGN struct
  emr           EMR         <>
  cbRgnData     DWORD       ?
  iMode         DWORD       ?
  RgnData       BYTE        ?
EMREXTSELECTCLIPRGN ends

EMREXTTEXTOUT struct
  emr               EMR         <>
  rclBounds         RECTL       <>
  iGraphicsMode     DWORD       ?
  exScale           DWORD       ?
  eyScale           DWORD       ?
  emrtext           EMRTEXT     <>
EMREXTTEXTOUT ends

EMRBITBLT struct
  emr EMR                 <>
  rclBounds     RECTL     <>
  xDest         DWORD      ?
  yDest         DWORD      ?
  cxDest        DWORD      ?
  cyDest        DWORD      ?
  dwRop         DWORD      ?
  xSrc          DWORD      ?
  ySrc          DWORD      ?
  xformSrc      XFORM     <>
  crBkColorSrc  COLORREF   ?
  iUsageSrc     DWORD      ?
  offBmiSrc     DWORD      ?
  cbBmiSrc      DWORD      ?
  offBitsSrc    DWORD      ?
  cbBitsSrc     DWORD      ?
EMRBITBLT ends

EMRSTRETCHBLT struct
  emr           EMR        <>
  rclBounds     RECTL      <>
  xDest         DWORD      ?
  yDest         DWORD      ?
  cxDest        DWORD      ?
  cyDest        DWORD      ?
  dwRop         DWORD      ?
  xSrc          DWORD      ?
  ySrc          DWORD      ?
  xformSrc      XFORM     <>
  crBkColorSrc  COLORREF   ?
  iUsageSrc     DWORD      ?
  offBmiSrc     DWORD      ?
  cbBmiSrc      DWORD      ?
  offBitsSrc    DWORD      ?
  cbBitsSrc     DWORD      ?
  cxSrc         DWORD      ?
  cySrc         DWORD      ?
EMRSTRETCHBLT ends

EMRMASKBLT struct
  emr           EMR <>
  rclBounds     RECTL <>
  xDest         DWORD      ?
  yDest         DWORD      ?
  cxDest        DWORD      ?
  cyDest        DWORD      ?
  dwRop         DWORD      ?
  xSrc2         DWORD      ?
  cyDest2       DWORD      ?
  dwRop2        DWORD      ?
  xSrc          DWORD      ?
  ySrc          DWORD      ?
  xformSrc      XFORM      <>
  crBkColorSrc  COLORREF   ?
  iUsageSrc     DWORD      ?
  offBmiSrc     DWORD      ?
  cbBmiSrc      DWORD      ?
  offBitsSrc    DWORD      ?
  cbBitsSrc     DWORD      ?
  xMask         DWORD      ?
  yMask         DWORD      ?
  iUsageMask    DWORD      ?
  offBmiMask    DWORD      ?
  cbBmiMask     DWORD      ?
  offBitsMask   DWORD      ?
  cbBitsMask    DWORD      ?
EMRMASKBLT ends

EMRPLGBLT struct
  emr           EMR <>
  rclBounds     RECTL <>
  aptlDest      POINTL 3 dup(<>)
  xSrc          DWORD      ?
  ySrc          DWORD      ?
  cxSrc         DWORD      ?
  cySrc         DWORD      ?
  xformSrc      XFORM <>
  crBkColorSrc  COLORREF ?
  iUsageSrc     DWORD      ?
  offBmiSrc     DWORD      ?
  cbBmiSrc      DWORD      ?
  offBitsSrc    DWORD      ?
  cbBitsSrc     DWORD      ?
  xMask         DWORD      ?
  yMask         DWORD      ?
  iUsageMask    DWORD      ?
  offBmiMask    DWORD      ?
  cbBmiMask     DWORD      ?
  offBitsMask   DWORD      ?
  cbBitsMask    DWORD      ?
EMRPLGBLT ends

EMRSETDIBITSTODEVICE struct
  emr           EMR       <>
  rclBounds     RECTL     <>
  xDest         DWORD      ?
  yDest         DWORD      ?
  xSrc          DWORD      ?
  ySrc          DWORD      ?
  cxSrc         DWORD      ?
  cySrc         DWORD      ?
  offBmiSrc     DWORD      ?
  cbBmiSrc      DWORD      ?
  offBitsSrc    DWORD      ?
  cbBitsSrc     DWORD      ?
  iUsageSrc     DWORD      ?
  iStartScan    DWORD      ?
  cScans        DWORD      ?
EMRSETDIBITSTODEVICE ends

EMRSTRETCHDIBITS struct
  emr           EMR        <>
  rclBounds     RECTL      <>
  xDest         DWORD      ?
  yDest         DWORD      ?
  xSrc          DWORD      ?
  ySrc          DWORD      ?
  cxSrc         DWORD      ?
  cySrc         DWORD      ?
  offBmiSrc     DWORD      ?
  cbBmiSrc      DWORD      ?
  offBitsSrc    DWORD      ?
  cbBitsSrc     DWORD      ?
  iUsageSrc     DWORD      ?
  dwRop         DWORD      ?
  cxDest        DWORD      ?
  cyDest        DWORD      ?
EMRSTRETCHDIBITS ends

EMRCREATEPALETTE struct
  emr       EMR <>
  ihPal     DWORD       ?
  lgpl      LOGPALETTE  <>
EMRCREATEPALETTE ends

EMRCREATEPEN struct
  emr       EMR <>
  ihPen     DWORD       ?
  lopn      LOGPEN      <>
EMRCREATEPEN ends

EMREXTCREATEPEN struct
  emr       EMR <>
  ihPen     DWORD      ?
  offBmi    DWORD      ?
  cbBmi     DWORD      ?
  offBits   DWORD      ?
  cbBits    DWORD      ?
  elp       EXTLOGPEN <>
EMREXTCREATEPEN ends

EMRCREATEBRUSHINDIRECT struct
  emr       EMR <>
  ihBrush   DWORD      ?
  lb        LOGBRUSH <>
EMRCREATEBRUSHINDIRECT ends

EMRCREATEMONOBRUSH struct
  emr       EMR        <>
  ihBrush   DWORD      ?
  iUsage    DWORD      ?
  offBmi    DWORD      ?
  cbBmi     DWORD      ?
  offBits   DWORD      ?
  cbBits    DWORD      ?
EMRCREATEMONOBRUSH ends

EMRCREATEDIBPATTERNBRUSHPT struct
  emr       EMR <>
  ihBursh   DWORD      ?
  iUsage    DWORD      ?
  offBmi    DWORD      ?
  cbBmi     DWORD      ?
  offBits   DWORD      ?
  cbBits    DWORD      ?
EMRCREATEDIBPATTERNBRUSHPT ends

CIEXYZ struct
        ciexyzX FXPT2DOT30 ?
        ciexyzY FXPT2DOT30 ?
        ciexyzZ FXPT2DOT30 ?
CIEXYZ ends

CIEXYZTRIPLE struct
        ciexyzRed   CIEXYZ <>
        ciexyzGreen CIEXYZ <>
        ciexyzBlue  CIEXYZ <>
CIEXYZTRIPLE ends

BITMAPV4HEADER struct
  bV4Size           DWORD      ?
  bV4Width          DWORD      ?
  bV4Height         DWORD      ?
  bV4Planes         WORD       ?
  bV4BitCount       WORD       ?
  bV4V4Compression  DWORD      ?
  bV4SizeImage      DWORD      ?
  bV4XPelsPerMeter  DWORD      ?
  bV4YPelsPerMeter  DWORD      ?
  bV4ClrUsed        DWORD      ?
  bV4ClrImportant   DWORD      ?
  bV4RedMask        DWORD      ?
  bV4GreenMask      DWORD      ?
  bV4BlueMask       DWORD      ?
  bV4AlphaMask      DWORD      ?
  bV4CSType         DWORD      ?
  bV4Endpoints      CIEXYZTRIPLE <>
  bV4GammaRed       DWORD      ?
  bV4GammaGreen     DWORD      ?
  bV4GammaBlue      DWORD      ?
BITMAPV4HEADER ends

FONTSIGNATURE struct
  fsUsb4  DWORD      4 dup(?)
  fsCsb2  DWORD      2 dup(?)
FONTSIGNATURE ends

CHARSETINFO struct
  ciCharset     DWORD      ?
  ciACP         DWORD      ?
  xlfs          FONTSIGNATURE <>
CHARSETINFO ends

LOCALESIGNATURE struct
  lsUsb4            DWORD     4 dup(?)
  lsCsbDefault      DWORD     2 dup(?)
  lsCsbSupported    DWORD     2 dup(?)
LOCALESIGNATURE ends

NEWTEXTMETRICEX struct
  ntmTm         NEWTEXTMETRIC  <>
  ntmFontSig    FONTSIGNATURE   <>
NEWTEXTMETRICEX ends

ENUMLOGFONTEX struct
  elfLogFont        LOGFONT    <>
  elfFullName       TCHAR        LF_FULLFACESIZE dup(?)
  elfStyle          TCHAR        LF_FACESIZE dup(?)
  elfScript         TCHAR        LF_FACESIZE dup(?)
ENUMLOGFONTEX ends

GCP_RESULTSW struct
  lStructSize   DWORD      ?
  lpOutString   DWORD      ?
  lpOrder       DWORD      ?
  lpDX          DWORD      ?
  lpCaretPos    DWORD      ?
  lpClass       DWORD      ?
  lpGlyphs      DWORD      ?
  nGlyphs       DWORD      ?
  nMaxFit       DWORD      ?
GCP_RESULTSW ends

LOGCOLORSPACE struct
    lcsSignature    DWORD ?
    lcsVersion      DWORD ?
    lcsSize         DWORD ?
    lcsCSType       LCSCSTYPE ?
    lcsIntent       LCSGAMUTMATCH ?
    lcsEndpoints    CIEXYZTRIPLE <>
    lcsGammaRed     DWORD ?
    lcsGammaGreen   DWORD ?
    lcsGammaBlue    DWORD ?
    lcsFilename     TCHAR MAX_PATH dup(?)
LOGCOLORSPACE ends

EMRCREATECOLORSPACE struct
  emr   EMR <>
  ihCS  DWORD      ?
  lcs   LOGCOLORSPACE <>
  dwFlags   DWORD        ?
  cbData    DWORD        ?
  Data      BYTE 1 dup(?)
EMRCREATECOLORSPACE ends

CBTACTIVATESTRUCT struct
  fMouse        DWORD    ?
  hWndActive    DWORD    ?
CBTACTIVATESTRUCT ends

EVENTMSG struct
  message   DWORD      ?
  paramL    DWORD      ?
  paramH    DWORD      ?
  time      DWORD      ?
  hwnd      DWORD      ?
EVENTMSG ends

CWPSTRUCT struct
  lParam    DWORD      ?
  wParam    DWORD      ?
  message   DWORD      ?
  hwnd      DWORD      ?
CWPSTRUCT ends

DEBUGHOOKINFO struct
  hModuleHook   DWORD      ?
  Reserved      DWORD      ?
  lParam        DWORD      ?
  wParam        DWORD      ?
  code          DWORD      ?
DEBUGHOOKINFO ends

MOUSEHOOKSTRUCT struct
  pt            POINT      <>
  hwnd          DWORD      ?
  wHitTestCode  DWORD      ?
  dwExtraInfo   DWORD      ?
MOUSEHOOKSTRUCT ends

MINMAXINFO struct
  ptReserved        POINT <>
  ptMaxSize         POINT <>
  ptMaxPosition     POINT <>
  ptMinTrackSize    POINT <>
  ptMaxTrackSize    POINT <>
MINMAXINFO ends

COPYDATASTRUCT struct
  dwData  DWORD      ?
  cbData  DWORD      ?
  lpData  DWORD      ?
COPYDATASTRUCT ends

WINDOWPOS struct
  hwnd              DWORD      ?
  hWndInsertAfter   DWORD      ?
  x                 DWORD      ?
  y                 DWORD      ?
  lx                DWORD      ?
  cy                DWORD      ?
  flags             DWORD      ?
WINDOWPOS ends

ACCEL struct ;WORD
  fVirt BYTE ?
  key   WORD ?
  cmd   WORD ?
ACCEL ends

PAINTSTRUCT struct
  hdc           DWORD      ?
  fErase        DWORD      ?
  rcPaint       RECT       <>
  fRestore      DWORD      ?
  fIncUpdate    DWORD      ?
  rgbReserved   BYTE 32 dup(?)
PAINTSTRUCT ends

CREATESTRUCT struct
  lpCreateParams    DWORD      ?
  hInstance         DWORD      ?
  hMenu             DWORD      ?
  hWndParent        DWORD      ?
  ly                DWORD      ?
  lx                DWORD      ?
  y                 DWORD      ?
  x                 DWORD      ?
  style             DWORD      ?
  lpszName          DWORD      ?
  lpszClass         DWORD      ?
  ExStyle           DWORD      ?
CREATESTRUCT ends

CBT_CREATEWND struct
  lpcs              DWORD      ?
  hWndInsertAfter   DWORD      ?
CBT_CREATEWND ends

WINDOWPLACEMENT struct
  iLength           DWORD       ?
  flags             DWORD       ?
  showCmd           DWORD       ?
  ptMinPosition     POINT       <>
  ptMaxPosition     POINT       <>
  rcNormalPosition  RECT        <>
WINDOWPLACEMENT ends

MEASUREITEMSTRUCT struct
  CtlType       DWORD      ?
  CtlID         DWORD      ?
  itemID        DWORD      ?
  itemWidth     DWORD      ?
  itemHeight    DWORD      ?
  itemData      DWORD      ?
MEASUREITEMSTRUCT ends

DRAWITEMSTRUCT struct
  CtlType       DWORD      ?
  CtlID         DWORD      ?
  itemID        DWORD      ?
  itemAction    DWORD      ?
  itemState     DWORD      ?
  hwndItem      DWORD      ?
  hdc           DWORD      ?
  rcItem        RECT <>
  itemData      DWORD      ?
DRAWITEMSTRUCT ends

DELETEITEMSTRUCT struct
  CtlType   DWORD      ?
  CtlID     DWORD      ?
  itemID    DWORD      ?
  hwndItem  DWORD      ?
  itemData  DWORD      ?
DELETEITEMSTRUCT ends

COMPAREITEMSTRUCT struct
  CtlType       DWORD      ?
  CtlID         DWORD      ?
  hwndItem      DWORD      ?
  itemID1       DWORD      ?
  itemData1     DWORD      ?
  itemID2       DWORD      ?
  itemData2     DWORD      ?
  dwLocaleId    DWORD ?
COMPAREITEMSTRUCT ends

DLGTEMPLATE struct ;DWORD
  style             DWORD      ?
  dwExtendedStyle   DWORD      ?
  cdit              WORD      ?
  x                 WORD      ?
  y                 WORD      ?
  lx                WORD      ?
  ly                WORD      ?
DLGTEMPLATE ends

DLGITEMTEMPLATE struct
  style DWORD      ?
  dwExtendedStyle  DWORD      ?
  x     WORD      ?
  y     WORD      ?
  lx    WORD      ?
  cy    WORD      ?
  id    WORD      ?
DLGITEMTEMPLATE ends

MENUITEMTEMPLATEHEADER struct
  versionNumber     WORD      ?
  loffset           WORD      ?
MENUITEMTEMPLATEHEADER ends

MENUITEMTEMPLATE struct
  mtOption      WORD      ?
  mtID          WORD      ?
  mtString      WORD      ?
MENUITEMTEMPLATE ends

ICONINFO struct
  fIcon     DWORD      ?
  xHotspot  DWORD      ?
  yHotspot  DWORD      ?
  hbmMask   DWORD      ?
  hbmColor  DWORD      ?
ICONINFO ends

MDICREATESTRUCT struct
  szClass   DWORD      ?
  szTitle   DWORD      ?
  hOwner    DWORD      ?
  x         DWORD      ?
  y         DWORD      ?
  lx        DWORD      ?
  ly        DWORD      ?
  style     DWORD      ?
  lParam    DWORD      ?
MDICREATESTRUCT ends

CLIENTCREATESTRUCT struct
  hWindowMenu   DWORD      ?
  idFirstChild  DWORD      ?
CLIENTCREATESTRUCT ends

MULTIKEYHELP struct
  mkSize        DWORD      ?
  mkKeylist     TCHAR       ?
  szKeyphrase   TCHAR       ?
MULTIKEYHELP ends

HELPWININFO struct
  wStructSize   DWORD      ?
  x             DWORD      ?
  y             DWORD      ?
  lx            DWORD      ?
  ly            DWORD      ?
  wMax          DWORD      ?
  rgchMember    TCHAR 2 dup (?)
HELPWININFO ends

DDEACK struct
  dw ?
DDEACK ends

DDEADVISE struct
  dd ?
DDEADVISE ends

DDEDATA struct
        dd ?
        db ?
DDEDATA ends

DDEPOKE struct
        dd ?
        db ?
DDEPOKE ends

DDELN struct
        dd ?
DDELN ends

DDEUP struct
        dd ?
        db ?
DDEUP ends

HSZPAIR struct
  hszSvc    DWORD      ?
  hszTopic  DWORD      ?
HSZPAIR ends

SECURITY_QUALITY_OF_SERVICE struct
  iLength               DWORD      ?
  Impersonationlevel    DWORD      ?
  ContextTrackingMode   BYTE       ?
  EffectiveOnly         BYTE       ?
SECURITY_QUALITY_OF_SERVICE ends

CONVCONTEXT struct
  cb            DWORD      ?
  wFlags        DWORD      ?
  wCountryID    DWORD      ?
  iCodePage     DWORD      ?
  dwLangID      DWORD      ?
  dwSecurity    DWORD      ?
  qos           SECURITY_QUALITY_OF_SERVICE <>
CONVCONTEXT ends

CONVINFO struct
  cb            DWORD      ?
  hUser         DWORD      ?
  hConvPartner  DWORD      ?
  hszSvcPartner DWORD      ?
  hszServiceReq DWORD      ?
  hszTopic      DWORD      ?
  hszItem       DWORD      ?
  wFmt          DWORD      ?
  wType         DWORD      ?
  wStatus       DWORD      ?
  wConvst       DWORD      ?
  wLastError    DWORD      ?
  hConvList     DWORD      ?
  ConvCtxt      CONVCONTEXT <>
  hwnd          DWORD      ?
  hwndPartner   DWORD      ?
CONVINFO ends

DDEML_MSG_HOOK_DATA struct
  uiLo      DWORD      ?
  uiHi      DWORD      ?
  cbData    DWORD      ?
  xData     DWORD   8 dup(?)
DDEML_MSG_HOOK_DATA ends

MONMSGSTRUCT struct
  cb        DWORD      ?
  hwndTo    DWORD      ?
  dwTime    DWORD      ?
  htask     DWORD      ?
  wMsg      DWORD      ?
  wParam    DWORD      ?
  lParam    DWORD      ?
  dmhd      DDEML_MSG_HOOK_DATA <>
MONMSGSTRUCT ends

MONCBSTRUCT struct
  cb        DWORD      ?
  dwTime    DWORD      ?
  htask     DWORD      ?
  dwRet     DWORD      ?
  wType     DWORD      ?
  wFmt      DWORD      ?
  hConv     DWORD      ?
  hsz1      DWORD      ?
  hsz2      DWORD      ?
  hData     DWORD      ?
  dwData1   DWORD      ?
  dwData2   DWORD      ?
  cc        CONVCONTEXT <>
  cbData    DWORD      ?
  xData8    DWORD      ?
MONCBSTRUCT ends

MONHSZSTRUCT struct
  cb        DWORD      ?
  fsAction  DWORD      ?
  dwTime    DWORD      ?
  hsz       DWORD      ?
  htask     DWORD      ?
  xstr      TCHAR       ?
MONHSZSTRUCT ends

MONERRSTRUCT struct
  cb            DWORD      ?
  wLastError    DWORD      ?
  dwTime        DWORD      ?
  htask         DWORD      ?
MONERRSTRUCT ends

MONLINKSTRUCT struct
  cb            DWORD      ?
  dwTime        DWORD      ?
  htask         DWORD      ?
  fEstablished  DWORD      ?
  fNoData       DWORD      ?
  hszSvc        DWORD      ?
  hszTopic      DWORD      ?
  hszItem       DWORD      ?
  wFmt          DWORD      ?
  fServer       DWORD      ?
  hConvServer   DWORD      ?
  hConvClient   DWORD      ?
MONLINKSTRUCT ends

MONCONVSTRUCT struct
  cb            DWORD      ?
  fConnect      DWORD      ?
  dwTime        DWORD      ?
  htask         DWORD      ?
  hszSvc        DWORD      ?
  hszTopic      DWORD      ?
  hConvClient   DWORD      ?
  hConvServer   DWORD      ?
MONCONVSTRUCT ends

smpte struct
  hour      BYTE      ?
  minute    BYTE      ?
  sec       BYTE      ?
  frame     BYTE      ?
  fps       BYTE      ?
  dummy     BYTE      ?
  pad       BYTE      2 dup(?)
smpte ends

midi struct
  songptrpos  DWORD      ?
midi ends

MMUNION union
  ms        DWORD ?
  sample    DWORD ?
  cb        DWORD ?
  ticks     DWORD ?
  smp       smpte <>
  midi1     midi <>
MMUNION ends

MMTIME struct
  wType     DWORD      ?
  u         MMUNION <>
MMTIME ends

MIDIEVENT struct
  dwDeltaTime   DWORD      ?
  dwStreamID    DWORD      ?
  dwEvent       DWORD      ?
  dwParms       DWORD      ?
MIDIEVENT ends

MIDISTRMBUFFVER struct
  dwVersion     DWORD      ?
  dwMid         DWORD      ?
  dwOEMVersion  DWORD      ?
MIDISTRMBUFFVER ends

MIDIPROPTIMEDIV struct
  cbStruct      DWORD      ?
  dwTimeDiv     DWORD      ?
MIDIPROPTIMEDIV ends

MIDIPROPTEMPO struct
  cbStruct      DWORD      ?
  dwTempo       DWORD      ?
MIDIPROPTEMPO ends

MIXERCAPS struct
  wMid              WORD        ?
  wPid              WORD        ?
  vDriverVersion    MMVERSION   ?
  szPname           TCHAR MAXPNAMELEN dup (?)
  fdwSupport        DWORD       ?
  cDestinations     DWORD       ?
MIXERCAPS ends

Target struct
  dwType        DWORD           ?
  dwDeviceID    DWORD           ?
  wMid          WORD            ?
  wPid          WORD            ?
  vDriverVersion  MIXERCAPS     ?
  szPname       BYTE MAXPNAMELEN dup (?)
Target ends

MIXERLINECONTROLS struct
  cbStruct  DWORD      ?
  dwLineID  DWORD      ?
  union
      dwControlID   DWORD      ?
      dwControlType DWORD      ?
  ends
  cControls  DWORD      ?
  cbmxctrl  DWORD       ?
  pamxctrl  DWORD       ?
MIXERLINECONTROLS ends

MIXERCONTROLDETAILS struct
  cbStruct      DWORD      ?
  dwControlID   DWORD      ?
  cChannels     DWORD      ?
  union
      hwndOwner         DWORD ?
      cMultipleItems    DWORD ?
  ends
  cbDetails     DWORD      ?
  paDetails     DWORD      ?
MIXERCONTROLDETAILS ends

MIXERCONTROLDETAILS_BOOLEAN struct
  fValue  DWORD      ?
MIXERCONTROLDETAILS_BOOLEAN ends

MIXERCONTROLDETAILS_SIGNED struct
  lValue  DWORD      ?
MIXERCONTROLDETAILS_SIGNED ends

MIXERCONTROLDETAILS_UNSIGNED struct
  dwValue  DWORD      ?
MIXERCONTROLDETAILS_UNSIGNED ends

JOYINFOEX struct
  dwSize            DWORD      ?
  dwFlags           DWORD      ?
  dwXpos            DWORD      ?
  dwYpos            DWORD      ?
  dwZpos            DWORD      ?
  dwRpos            DWORD      ?
  dwUpos            DWORD      ?
  dwVpos            DWORD      ?
  dwButtons         DWORD      ?
  dwButtonNumber    DWORD      ?
  dwPOV             DWORD      ?
  dwReserved1       DWORD      ?
  dwReserved2       DWORD      ?
JOYINFOEX ends

DRVCONFIGINFOEX struct
  dwDCISize             DWORD      ?
  lpszDCISectionName    DWORD      ?
  lpszDCIAliasName      DWORD      ?
  dnDevNode             DWORD      ?
DRVCONFIGINFOEX ends

DRVCONFIGINFO struct
  dwDCISize             DWORD      ?
  lpszDCISectionName    DWORD      ?
  lpszDCIAliasName      DWORD      ?
DRVCONFIGINFO ends

WAVEHDR struct
  lpData            DWORD      ?
  dwBufferLength    DWORD      ?
  dwBytesRecorded   DWORD      ?
  dwUser            DWORD      ?
  dwFlags           DWORD      ?
  dwLoops           DWORD      ?
  lpNext            DWORD      ?
  Reserved          DWORD      ?
WAVEHDR ends

WAVEOUTCAPS struct
  wMid              WORD        ?
  wPid              WORD        ?
  vDriverVersion    MMVERSION   ?
  szPname           TCHAR MAXPNAMELEN dup (?)
  dwFormats         DWORD       ?
  wChannels         WORD        ?
  wReserved1        WORD        ?
  dwSupport         DWORD       ?
WAVEOUTCAPS ends

WAVEINCAPS struct
  wMid              WORD        ?
  wPid              WORD        ?
  vDriverVersion    MMVERSION   ?
  szPname           TCHAR MAXPNAMELEN dup (?)
  dwFormats         DWORD       ?
  wChannels         WORD        ?
  wReserved1        WORD        ?
WAVEINCAPS ends

WAVEFORMAT struct
  wFormatTag        WORD      ?
  nChannels         WORD      ?
  nSamplesPerSec    DWORD     ?
  nAvgBytesPerSec   DWORD     ?
  nBlockAlign       WORD      ?
WAVEFORMAT ends

PCMWAVEFORMAT struct
  wf                WAVEFORMAT <>
  wBitsPerSample    WORD       ?
PCMWAVEFORMAT ends

MIDIOUTCAPS struct
  wMid              WORD      ?
  wPid              WORD      ?
  vDriverVersion    MMVERSION ?
  szPname           TCHAR MAXPNAMELEN dup (?)
  wTechnology       WORD      ?
  wVoices           WORD      ?
  wNotes            WORD      ?
  wChannelMask      WORD      ?
  dwSupport         DWORD     ?
MIDIOUTCAPS ends

MIDIINCAPS struct
  wMid              WORD            ?
  wPid              WORD            ?
  vDriverVersion    MMVERSION       ?
  szPname           TCHAR MAXPNAMELEN dup (?)
  dwSupport         DWORD ?
MIDIINCAPS ends

MIDIHDR struct
  lpData            DWORD      ?
  dwBufferiLength   DWORD      ?
  dwBytesRecorded   DWORD      ?
  dwUser            DWORD      ?
  dwFlags           DWORD      ?
  lpNext            DWORD      ?
  Reserved          DWORD      ?
  dwOffset          DWORD      ?
  dwReserved        DWORD 8 dup(?)
MIDIHDR ends

AUXCAPS struct
  wMid              WORD            ?
  wPid              WORD            ?
  vDriverVersion    MMVERSION       ?
  szPname           TCHAR MAXPNAMELEN dup (?)
  wTechnology       WORD            ?
  dwSupport         DWORD           ?
AUXCAPS ends

TIMECAPS struct
  wPeriodMin  DWORD      ?
  wPeriodMax  DWORD      ?
TIMECAPS ends

JOYCAPS struct
  wMid          WORD      ?
  wPid          WORD      ?
  szPname       TCHAR MAXPNAMELEN dup (?)
  wXmin         WORD      ?
  wXmax         WORD      ?
  wYmin         WORD      ?
  wYmax         WORD      ?
  wZmin         WORD      ?
  wZmax         WORD      ?
  wNumButtons   WORD      ?
  wPeriodMin    WORD      ?
  wPeriodMax    WORD      ?
  wRmin         DWORD ?
  wRmax         DWORD ?
  wUmin         DWORD ?
  wUmax         DWORD ?
  wVmin         DWORD ?
  wVmax         DWORD ?
  wCaps         DWORD ?
  wMaxAxes      DWORD ?
  wNumAxes      DWORD ?
  wMaxButtons   DWORD ?
  szRegKey      TCHAR MAXPNAMELEN dup(?)
  szOEMVxD      TCHAR MAX_JOYSTICKOEMVXDNAME dup(?)
JOYCAPS ends

JOYINFO struct
  wXpos     WORD      ?
  wYpos     WORD      ?
  wZpos     WORD      ?
  wButtons  WORD      ?
JOYINFO ends

MMIOINFO struct
  dwFlags       DWORD      ?
  fccIOProc     DWORD      ?
  pIOProc       DWORD      ?
  wErrorRet     DWORD      ?
  htask         DWORD      ?
  cchBuffer     DWORD      ?
  pchBuffer     DWORD      ?
  pchNext       DWORD      ?
  pchEndRead    DWORD      ?
  pchEndWrite   DWORD      ?
  lBufOffset    DWORD      ?
  lDiskOffset   DWORD      ?
  adwInfo       DWORD     3 dup(?)
  dwReserved1   DWORD      ?
  dwReserved2   DWORD      ?
  hmmio         DWORD      ?
MMIOINFO ends

MMCKINFO struct
  ckid          DWORD      ?
  ckSize        DWORD      ?
  fccType       DWORD      ?
  dwDataOffset  DWORD      ?
  dwFlags       DWORD      ?
MMCKINFO ends

MCI_GENERIC_PARMS struct
  dwCallback  DWORD      ?
MCI_GENERIC_PARMS ends

MCI_OPEN_PARMS struct
  dwCallback        DWORD      ?
  wDeviceID         DWORD      ?
  lpstrDeviceType   DWORD      ?
  lpstrElementName  DWORD      ?
  lpstrAlias        DWORD      ?
MCI_OPEN_PARMS ends

MCI_PLAY_PARMS struct
  dwCallback    DWORD      ?
  dwFrom        DWORD      ?
  dwTo          DWORD      ?
MCI_PLAY_PARMS ends

MCI_SEEK_PARMS struct
  dwCallback    DWORD      ?
  dwTo          DWORD      ?
MCI_SEEK_PARMS ends

MCI_STATUS_PARMS struct
  dwCallback    DWORD      ?
  dwReturn      DWORD      ?
  dwItem        DWORD      ?
  dwTrack       DWORD      ?
MCI_STATUS_PARMS ends

MCI_INFO_PARMS struct
  dwCallback    DWORD      ?
  lpstrReturn   DWORD      ?
  dwRetSize     DWORD      ?
MCI_INFO_PARMS ends

MCI_GETDEVCAPS_PARMS struct
  dwCallback    DWORD      ?
  dwReturn      DWORD      ?
  dwItem        DWORD      ?
MCI_GETDEVCAPS_PARMS ends

MCI_SYSINFO_PARMS struct
  dwCallback    DWORD      ?
  lpstrReturn   DWORD      ?
  dwRetSize     DWORD      ?
  dwNumber      DWORD      ?
  wDeviceType   DWORD      ?
MCI_SYSINFO_PARMS ends

MCI_SET_PARMS struct
  dwCallback    DWORD      ?
  dwTimeFormat  DWORD      ?
  dwAudio       DWORD      ?
MCI_SET_PARMS ends

MCI_BREAK_PARMS struct
  dwCallback    DWORD      ?
  nVirtKey      DWORD      ?
  hwndBreak     DWORD      ?
MCI_BREAK_PARMS ends

MCI_SOUND_PARMS struct
  dwCallback        DWORD      ?
  lpstrSoundName    DWORD      ?
MCI_SOUND_PARMS ends

MCI_SAVE_PARMS struct
  dwCallback  DWORD      ?
  lpFileName  DWORD      ?
MCI_SAVE_PARMS ends

MCI_LOAD_PARMS struct
  dwCallback  DWORD      ?
  lpFileName  DWORD      ?
MCI_LOAD_PARMS ends

MCI_RECORD_PARMS struct
  dwCallback    DWORD      ?
  dwFrom        DWORD      ?
  dwTo          DWORD      ?
MCI_RECORD_PARMS ends

MCI_VD_PLAY_PARMS struct
  dwCallback    DWORD      ?
  dwFrom        DWORD      ?
  dwTo          DWORD      ?
  dwSpeed       DWORD      ?
MCI_VD_PLAY_PARMS ends

MCI_VD_STEP_PARMS struct
  dwCallback    DWORD      ?
  dwFrames      DWORD      ?
MCI_VD_STEP_PARMS ends

MCI_VD_ESCAPE_PARMS struct
  dwCallback    DWORD      ?
  lpstrCommand  DWORD      ?
MCI_VD_ESCAPE_PARMS ends

MCI_WAVE_OPEN_PARMS struct
  dwCallback        DWORD      ?
  wDeviceID         DWORD      ?
  lpstrDeviceType   DWORD      ?
  lpstrElementName  DWORD      ?
  lpstrAlias        DWORD      ?
  dwBufferSeconds   DWORD      ?
MCI_WAVE_OPEN_PARMS ends

MCI_WAVE_DELETE_PARMS struct
  dwCallback    DWORD      ?
  dwFrom        DWORD      ?
  dwTo          DWORD      ?
MCI_WAVE_DELETE_PARMS ends

MCI_WAVE_SET_PARMS struct
  dwCallback        DWORD      ?
  dwTimeFormat      DWORD      ?
  dwAudio           DWORD      ?
  wInput            DWORD      ?
  wOutput           DWORD      ?
  wFormatTag        WORD       ?
  wReserved2        WORD       ?
  nChannels         WORD       ?
  wReserved3        WORD       ?
  nSamplesPerSec    DWORD      ?
  nAvgBytesPerSec   DWORD      ?
  nBlockAlign       WORD       ?
  wReserved4        WORD       ?
  wBitsPerSample    WORD       ?
  wReserved5        WORD       ?
MCI_WAVE_SET_PARMS ends

MCI_SEQ_SET_PARMS struct
  dwCallback    DWORD      ?
  dwTimeFormat  DWORD      ?
  dwAudio       DWORD      ?
  dwTempo       DWORD      ?
  dwPort        DWORD      ?
  dwSlave       DWORD      ?
  dwMaster      DWORD      ?
  dwOffset      DWORD      ?
MCI_SEQ_SET_PARMS ends

MCI_ANIM_OPEN_PARMS struct
  dwCallback        DWORD      ?
  wDeviceID         DWORD      ?
  lpstrDeviceType   DWORD      ?
  lpstrElementName  DWORD      ?
  lpstrAlias        DWORD      ?
  dwStyle           DWORD      ?
  hWndParent        DWORD      ?
MCI_ANIM_OPEN_PARMS ends

MCI_ANIM_PLAY_PARMS struct
  dwCallback    DWORD      ?
  dwFrom        DWORD      ?
  dwTo          DWORD      ?
  dwSpeed       DWORD      ?
MCI_ANIM_PLAY_PARMS ends

MCI_ANIM_STEP_PARMS struct
  dwCallback    DWORD      ?
  dwFrames      DWORD      ?
MCI_ANIM_STEP_PARMS ends

MCI_ANIM_WINDOW_PARMS struct
  dwCallback    DWORD      ?
  hwnd          DWORD      ?
  nCmdShow      DWORD      ?
  lpstrText     DWORD      ?
MCI_ANIM_WINDOW_PARMS ends

MCI_ANIM_RECT_PARMS struct
  dwCallback    DWORD      ?
  rc            RECT       <>
MCI_ANIM_RECT_PARMS ends

MCI_ANIM_UPDATE_PARMS struct
  dwCallback    DWORD      ?
  rc            RECT       <>
  hdc           DWORD      ?
MCI_ANIM_UPDATE_PARMS ends

MCI_OVLY_OPEN_PARMS struct
  dwCallback        DWORD      ?
  wDeviceID         DWORD      ?
  lpstrDeviceType   DWORD      ?
  lpstrElementName  DWORD      ?
  lpstrAlias        DWORD      ?
  dwStyle           DWORD      ?
  hWndParent        DWORD      ?
MCI_OVLY_OPEN_PARMS ends

MCI_OVLY_WINDOW_PARMS struct
  dwCallback    DWORD       ?
  hwnd          DWORD       ?
  nCmdShow      DWORD       ?
  lpstrText     DWORD       ?
MCI_OVLY_WINDOW_PARMS ends

MCI_OVLY_RECT_PARMS struct
  dwCallback    DWORD       ?
  rc            RECT        <>
MCI_OVLY_RECT_PARMS ends

MCI_OVLY_SAVE_PARMS struct
  dwCallback    DWORD      ?
  lpFileName    DWORD      ?
  rc            RECT       <>
MCI_OVLY_SAVE_PARMS ends

MCI_OVLY_LOAD_PARMS struct
  dwCallback    DWORD   ?
  lpFileName    DWORD   ?
  rc            RECT    <>
MCI_OVLY_LOAD_PARMS ends

PRINTER_INFO_1 struct
  flags         DWORD      ?
  pDescription  DWORD      ?
  pName         DWORD      ?
  pComment      DWORD      ?
PRINTER_INFO_1 ends

PRINTER_INFO_2 struct
  pServerName           DWORD      ?
  pPrinterName          DWORD      ?
  pShareName            DWORD      ?
  pPortName             DWORD      ?
  pDriverName           DWORD      ?
  pComment              DWORD      ?
  pLocation             DWORD      ?
  pDevMode              DWORD      ?
  pSepFile              DWORD      ?
  pPrintProcessor       DWORD      ?
  pDatatype             DWORD      ?
  pParameters           DWORD      ?
  pSecurityDescriptor   DWORD      ?
  Attributes            DWORD      ?
  Priority              DWORD      ?
  DefaultPriority       DWORD      ?
  StartTime             DWORD      ?
  UntilTime             DWORD      ?
  Status                DWORD      ?
  cJobs                 DWORD      ?
  AveragePPM            DWORD      ?
PRINTER_INFO_2 ends

PRINTER_INFO_3 struct
  pSecurityDescriptor  DWORD      ?
PRINTER_INFO_3 ends

PRINTER_INFO_4 struct
  pPrinterName  DWORD ?
  pServerName   DWORD ?
  Attributes    DWORD ?
PRINTER_INFO_4 ends

JOB_INFO_1 struct
  JobId         DWORD      ?
  pPrinterName  DWORD      ?
  pMachineName  DWORD      ?
  pUserName     DWORD      ?
  pDocument     DWORD      ?
  pDatatype     DWORD      ?
  pStatus       DWORD      ?
  Status        DWORD      ?
  Priority      DWORD      ?
  Position      DWORD      ?
  TotalPages    DWORD      ?
  PagesPrinted  DWORD      ?
  Submitted     SYSTEMTIME <>
JOB_INFO_1 ends

JOB_INFO_2 struct
  JobId                 DWORD      ?
  pPrinterName          DWORD      ?
  pMachineName          DWORD      ?
  pUserName             DWORD      ?
  pDocument             DWORD      ?
  pNotifyName           DWORD      ?
  pDatatype             DWORD      ?
  pPrintProcessor       DWORD      ?
  pParameters           DWORD      ?
  pDriverName           DWORD      ?
  pDevMode              DWORD      ?
  pStatus               DWORD      ?
  pSecurityDescriptor   DWORD      ?
  Status                DWORD      ?
  Priority              DWORD      ?
  Position              DWORD      ?
  StartTime             DWORD      ?
  UntilTime             DWORD      ?
  TotalPages            DWORD      ?
  isize                 DWORD      ?
  Submitted             SYSTEMTIME <>
  time                  DWORD      ?
  PagesPrinted          DWORD      ?
JOB_INFO_2 ends

ADDJOB_INFO_1 struct
  Path      DWORD      ?
  JobId     DWORD      ?
ADDJOB_INFO_1 ends

DRIVER_INFO_1W struct
  pName     DWORD      ?
DRIVER_INFO_1W ends

DRIVER_INFO_2 struct
  cVersion      DWORD      ?
  pName         DWORD      ?
  pEnvironment  DWORD      ?
  pDriverPath   DWORD      ?
  pDataFile     DWORD      ?
  pConfigFile   DWORD      ?
DRIVER_INFO_2 ends

DOC_INFO_1 struct
  pDocName      DWORD      ?
  pOutputFile   DWORD      ?
  pDatatype     DWORD      ?
DOC_INFO_1 ends

FORM_INFO_1 struct
  Flags         DWORD       ?
  pName         DWORD       ?
  iSize         SIZEL       <>
  ImageableArea RECTL       <>
FORM_INFO_1 ends

PRINTPROCESSOR_INFO_1 struct
  pName  DWORD      ?
PRINTPROCESSOR_INFO_1 ends

PORT_INFO_1 struct
  pName  DWORD      ?
PORT_INFO_1 ends

MONITOR_INFO_1 struct
  pName  DWORD      ?
MONITOR_INFO_1 ends

MONITOR_INFO_2 struct
  pName         DWORD      ?
  pEnvironment  DWORD      ?
  pDLLName      DWORD      ?
MONITOR_INFO_2 ends

DATATYPES_INFO_1 struct
  pName  DWORD      ?
DATATYPES_INFO_1 ends

PRINTER_DEFAULTS struct
  pDatatype         DWORD       ?
  pDevMode          DWORD       ?
  DesiredAccess     ACCESS_MASK ?
PRINTER_DEFAULTS ends

PRINTER_INFO_5 struct
  pPrinterName              DWORD      ?
  pPortName                 DWORD      ?
  Attributes                DWORD      ?
  DeviceNotSelectedTimeout  DWORD      ?
  TransmissionRetryTimeout  DWORD      ?
PRINTER_INFO_5 ends

DRIVER_INFO_3 struct
  cVersion          DWORD      ?
  pName             DWORD      ?
  pEnvironment      DWORD      ?
  pDriverPath       DWORD      ?
  pDataFile         DWORD      ?
  pConfigFile       DWORD      ?
  pHelpFile         DWORD      ?
  pDependentFiles   DWORD      ?
  pMonitorName      DWORD      ?
  pDefaultDataType  DWORD      ?
DRIVER_INFO_3 ends

DOC_INFO_2 struct
  pDocName      DWORD      ?
  pOutputFile   DWORD      ?
  pDatatype     DWORD      ?
  dwMode        DWORD      ?
  JobId         DWORD      ?
DOC_INFO_2 ends

PORT_INFO_2 struct
  pPortName     DWORD      ?
  pMonitorName  DWORD      ?
  pDescription  DWORD      ?
  fPortType     DWORD      ?
  Reserved      DWORD      ?
PORT_INFO_2 ends

PROVIDOR_INFO_1 struct
  pName         DWORD      ?
  pEnvironment  DWORD      ?
  pDLLName      DWORD      ?
PROVIDOR_INFO_1 ends

NETRESOURCE struct
  dwScope           DWORD      ?
  dwType            DWORD      ?
  dwDisplayType     DWORD      ?
  dwUsage           DWORD      ?
  lpLocalName       DWORD      ?
  lpRemoteName      DWORD      ?
  lpComment         DWORD      ?
  lpProvider        DWORD      ?
NETRESOURCE ends

NCB struct
  ncb_command       BYTE    ?
  ncb_retcode       BYTE    ?
  ncb_lsn           BYTE    ?
  ncb_num           BYTE    ?
  ncb_buffer        DWORD   ?
  ncb_length        WORD    ?
  ncb_callname      BYTE NCBNAMSZ dup (?)
  ncb_name          BYTE NCBNAMSZ dup (?)
  ncb_rto           BYTE    ?
  ncb_sto           BYTE    ?
  ncb_post          DWORD   ?
  ncb_lana_num      BYTE    ?
  ncb_cmd_cplt      BYTE    ?
  ncb_reserve       BYTE    10 DUP(?)
  ncb_event         DWORD   ?
NCB ends

ADAPTER_STATUS struct
  adapter_address   BYTE 6 dup (?)
  rev_major         BYTE      ?
  reserved0         BYTE      ?
  adapter_type      BYTE      ?
  rev_minor         BYTE      ?
  duration          WORD      ?
  frmr_recv         WORD      ?
  frmr_xmit         WORD      ?
  iframe_recv_err   WORD      ?
  xmit_aborts       WORD      ?
  xmit_success      DWORD     ?
  recv_success      DWORD     ?
  iframe_xmit_err   WORD      ?
  recv_buff_unavail WORD      ?
  t1_timeouts       WORD      ?
  ti_timeouts       WORD      ?
  rserved1          DWORD     ?
  free_ncbs         WORD      ?
  max_cfg_ncbs      WORD      ?
  max_ncbs          WORD      ?
  xmit_buf_unavail  WORD      ?
  max_dgram_isize   WORD      ?
  pending_sess      WORD      ?
  max_cfg_sess      WORD      ?
  max_sess          WORD      ?
  max_sess_pkt_isize WORD     ?
  name_count        WORD      ?
ADAPTER_STATUS ends

NAME_BUFFER struct
  xname         BYTE NCBNAMSZ dup (?)
  name_num      BYTE      ?
  name_flags    BYTE      ?
NAME_BUFFER ends

SESSION_HEADER struct
  sess_name             BYTE      ?
  num_sess              BYTE      ?
  rcv_dg_outstanding    BYTE      ?
  rcv_any_outstanding   BYTE      ?
SESSION_HEADER ends

SESSION_BUFFER struct
  lsn                   BYTE      ?
  State                 BYTE      ?
  local_name            BYTE NCBNAMSZ dup (?)
  remote_name           BYTE NCBNAMSZ dup (?)
  rcvs_outstanding      BYTE      ?
  sends_outstanding     BYTE      ?
SESSION_BUFFER ends

LANA_ENUM struct
  iLength   BYTE      ?
  lana      BYTE    MAX_LANA+1 DUP(?)
LANA_ENUM ends

FIND_NAME_HEADER struct
  node_count    WORD      ?
  Reserved      BYTE      ?
  unique_group  BYTE      ?
FIND_NAME_HEADER ends

FIND_NAME_BUFFER struct
  iLength           BYTE        ?
  access_control    BYTE        ?
  frame_control     BYTE        ?
  destination_addr  BYTE  6 DUP(?)
  source_addr       BYTE  6 DUP(?)
  routing_info      BYTE 18 DUP(?)
FIND_NAME_BUFFER ends

ACTION_HEADER struct
  transport_id  DWORD      ?
  action_code   WORD      ?
  Reserved      WORD      ?
ACTION_HEADER ends

CRGB struct
  bRed      BYTE      ?
  bGreen    BYTE      ?
  bBlue     BYTE      ?
  bExtra    BYTE      ?
CRGB ends

SERVICE_STATUS struct
  dwServiceType             DWORD      ?
  dwCurrentState            DWORD      ?
  dwControlsAccepted        DWORD      ?
  dwWin32ExitCode           DWORD      ?
  dwServiceSpecificExitCode DWORD      ?
  dwCheckPoint              DWORD      ?
  dwWaitHint                DWORD      ?
SERVICE_STATUS ends

ENUM_SERVICE_STATUS struct
  lpServiceName  DWORD      ?
  lpDisplayName  DWORD      ?
  ServiceStatus  SERVICE_STATUS <>
ENUM_SERVICE_STATUS ends

QUERY_SERVICE_LOCK_STATUS struct
  fIsLocked         DWORD      ?
  lpLockOwner       DWORD      ?
  dwLockDuration    DWORD      ?
QUERY_SERVICE_LOCK_STATUS ends

QUERY_SERVICE_CONFIG struct
  dwServiceType         DWORD      ?
  dwStartType           DWORD      ?
  dwErrorControl        DWORD      ?
  lpBinaryPathName      DWORD      ?
  lpLoadOrderGroup      DWORD      ?
  dwTagId               DWORD      ?
  lpDependencies        DWORD      ?
  lpServiceStartName    DWORD      ?
  lpDisplayName         DWORD      ?
QUERY_SERVICE_CONFIG ends

SERVICE_TABLE_ENTRY struct
  lpServiceName  DWORD      ?
  lpServiceProc  DWORD      ?
SERVICE_TABLE_ENTRY ends

PERF_DATA_BLOCK struct
  Signature             WORD 4 dup (?)
  LittleEndian          DWORD      ?
  Version               DWORD      ?
  Revision              DWORD      ?
  TotalByteiLength      DWORD      ?
  HeaderiLength         DWORD      ?
  NumObjectTypes        DWORD      ?
  DefaultObject         DWORD      ?
  SystemTime            SYSTEMTIME <>
  Padding               DWORD ?
  PerfTime              LARGE_INTEGER <>
  PerfFreq              LARGE_INTEGER <>
  PerTime100nSec        LARGE_INTEGER <>
  SystemNameiLength     DWORD      ?
  SystemNameOffset      DWORD      ?
PERF_DATA_BLOCK ends

PERF_OBJECT_TYPE struct
  TotalByteiLength      DWORD      ?
  DefinitioniLength     DWORD      ?
  HeaderiLength         DWORD      ?
  ObjectNameTitleIndex  DWORD      ?
  ObjectNameTitle       DWORD      ?
  ObjectHelpTitleIndex  DWORD      ?
  ObjectHelpTitle       DWORD      ?
  DetailLevel           DWORD      ?
  NumCounters           DWORD      ?
  DefaultCounter        DWORD      ?
  NumInstances          DWORD      ?
  CodePage              DWORD      ?
  PerfTime              LARGE_INTEGER <>
  PerfFreq              LARGE_INTEGER <>
PERF_OBJECT_TYPE ends

PERF_COUNTER_DEFINITION struct
  ByteiLength               DWORD      ?
  CounterNameTitleIndex     DWORD      ?
  CounterNameTitle          DWORD      ?
  CounterHelpTitleIndex     DWORD      ?
  CounterHelpTitle          DWORD      ?
  DefaultScale              DWORD      ?
  DetailLevel               DWORD      ?
  CounterType               DWORD      ?
  CounterSize               DWORD      ?
  CounterOffset             DWORD      ?
PERF_COUNTER_DEFINITION ends

PERF_INSTANCE_DEFINITION struct
  ByteiLength               DWORD      ?
  ParentObjectTitleIndex    DWORD      ?
  ParentObjectInstance      DWORD      ?
  UniqueID                  DWORD      ?
  NameOffset                DWORD      ?
  NameiLength               DWORD      ?
PERF_INSTANCE_DEFINITION ends

PERF_COUNTER_BLOCK struct
  ByteiLength  DWORD      ?
PERF_COUNTER_BLOCK ends

COMPOSITIONFORM struct
  dwStyle       DWORD      ?
  ptCurrentPos  POINT     <>
  rcArea        RECT      <>
COMPOSITIONFORM ends

CANDIDATEFORM struct
  dwIndex       DWORD      ?
  dwStyle       DWORD      ?
  ptCurrentPos  POINT     <>
  rcArea        RECT      <>
CANDIDATEFORM ends

CANDIDATELIST struct
  dwSize        DWORD      ?
  dwStyle       DWORD      ?
  dwCount       DWORD      ?
  dwSelection   DWORD      ?
  dwPageStart   DWORD      ?
  dwPageSize    DWORD      ?
  dwOffset1     DWORD      ?
CANDIDATELIST ends

STYLEBUF struct
  dwStyle           DWORD      ?
  szDescription     TCHAR STYLE_DESCRIPTION_SIZE dup (?)
STYLEBUF ends

MODEMDEVCAPS struct
  dwActualSize                  DWORD      ?
  dwRequiredSize                DWORD      ?
  dwDevSpecificOffset           DWORD      ?
  dwDevSpecificSize             DWORD      ?
  dwModemProviderVersion        DWORD      ?
  dwModemManufacturerOffset     DWORD      ?
  dwModemManufacturerSize       DWORD      ?
  dwModemModelOffset            DWORD      ?
  dwModemModelSize              DWORD      ?
  dwModemVersionOffset          DWORD      ?
  dwModemVersionSize            DWORD      ?
  dwDialOptions                 DWORD      ?
  dwCallSetupFailTimer          DWORD      ?
  dwInactivityTimeout           DWORD      ?
  dwSpeakerVolume               DWORD      ?
  dwSpeakerMode                 DWORD      ?
  dwModemOptions                DWORD      ?
  dwMaxDTERate                  DWORD      ?
  dwMaxDCERate                  DWORD      ?
  abVariablePortion             BYTE       ?
MODEMDEVCAPS ends

MODEMSETTINGS struct
  dwActualSize              DWORD      ?
  dwRequiredSize            DWORD      ?
  dwDevSpecificOffset       DWORD      ?
  dwDevSpecificSize         DWORD      ?
  dwCallSetupFailTimer      DWORD      ?
  dwInactivityTimeout       DWORD      ?
  dwSpeakerVolume           DWORD      ?
  dwSpeakerMode             DWORD      ?
  dwPreferredModemOptions   DWORD      ?
  dwNegotiatedModemOptions  DWORD      ?
  dwNegotiatedDCERate       DWORD      ?
  abVariablePortion         BYTE       ?
MODEMSETTINGS ends

DRAGINFO struct
  uSize         DWORD      ?
  pt            POINT      <>
  fNC           DWORD      ?
  lpFileList    DWORD      ?
  grfKeyState   DWORD      ?
DRAGINFO ends

APPBARDATA struct
  cbSize            DWORD      ?
  hwnd              DWORD      ?
  uCallbackMessage  DWORD      ?
  uEdge             DWORD      ?
  rc                RECT       <>
  lParam            DWORD      ?
APPBARDATA ends

SHELLEXECUTEINFO struct
  cbSize        DWORD       ?
  fMask         DWORD       ?
  hwnd          DWORD       ?
  lpVerb        DWORD       ?
  lpFile        DWORD       ?
  lpParameters  DWORD       ?
  lpDirectory   DWORD       ?
  nShow         DWORD       ?
  hInstApp      DWORD       ?
  lpIDList      DWORD       ?
  lpClass       DWORD       ?
  hkeyClass     DWORD       ?
  dwHotKey      DWORD       ?
  union
      hIcon     DWORD       ?
      hMonitor  DWORD       ?
  ends
  hProcess      DWORD       ?
SHELLEXECUTEINFO ends

  ; Structures from ShellAPI.h

SHFILEOPSTRUCT struct
   hwnd                   DWORD ?
   wFunc                  DWORD ?
   pFrom                  DWORD ?
   pTo                    DWORD ?
   fFlags                 WORD ?
   fAnyOperationsAborted  DWORD ?
   hNameMappings          DWORD ?
   lpszProgressTitle      DWORD ?
SHFILEOPSTRUCT ends

SHNAMEMAPPING struct
   pszOldPath             DWORD ?
   pszNewPath             DWORD ?
   cchOldPath             DWORD ?
   cchNewPath             DWORD ?
SHNAMEMAPPING ends

SHSTOCKICONINFO struct
   cbSize                 DWORD ?
   hIcon                  DWORD ?
   iSysImageIndex         DWORD ?
   iIcon                  DWORD ?
   szPath                 WORD MAX_PATH dup (?)
SHSTOCKICONINFO ends

OPEN_PRINTER_PROPS_INFO struct
   dwSize                 DWORD ?
   pszSheetName           DWORD ?
   uSheetIndex            DWORD ?
   dwFlags                DWORD ?
   bModal                 DWORD ?
OPEN_PRINTER_PROPS_INFO ends

GUID struct
    Data1   dd ?
    Data2   dw ?
    Data3   dw ?
    Data4   db 8 dup(?)
GUID ends
TYPEDEF _GUID, GUID

NOTIFYICONDATA struct
  cbSize            DWORD      ?
  hwnd              DWORD      ?
  uID               DWORD      ?
  uFlags            DWORD      ?
  uCallbackMessage  DWORD      ?
  hIcon             DWORD      ?
  szTip             TCHAR 64 dup (?)
                    TCHAR 64 dup (?)
  dwState           DWORD      ?
  dwStateMask       DWORD      ?
  szInfo            TCHAR 256 dup(?)
    union ;DUMMYUNIONNAME
      uTimeout          DWORD      ?
      uVersion          DWORD      ?
    ends
  szInfoTitle       TCHAR 64 dup(?)
  dwInfoFlags       DWORD      ?
  guidItem          GUID <>
  hBalloonIcon      DWORD      ?
NOTIFYICONDATA ends

SHFILEINFO struct
  hIcon             DWORD       ?
  iIcon             DWORD       ?
  dwAttributes      DWORD       ?
  szDisplayName     TCHAR        MAX_PATH DUP(?)
  szTypeName        TCHAR        80 dup(?)
SHFILEINFO ends

VS_FIXEDFILEINFO struct
  dwSignature           DWORD      ?
  dwStrucVersion        DWORD      ?
  dwFileVersionMS       DWORD      ?
  dwFileVersionLS       DWORD      ?
  dwProductVersionMS    DWORD      ?
  dwProductVersionLS    DWORD      ?
  dwFileFlagsMask       DWORD      ?
  dwFileFlags           DWORD      ?
  dwFileOS              DWORD      ?
  dwFileType            DWORD      ?
  dwFileSubtype         DWORD      ?
  dwFileDateMS          DWORD      ?
  dwFileDateLS          DWORD      ?
VS_FIXEDFILEINFO ends

ICONMETRICS struct
  cbSize        DWORD      ?
  iHorzSpacing  DWORD      ?
  iVertSpacing  DWORD      ?
  iTitleWrap    DWORD      ?
  lfFont        LOGFONT   <>
ICONMETRICS ends

HELPINFO struct
  cbSize        DWORD      ?
  iContextType  DWORD      ?
  iCtrlId       DWORD      ?
  hItemHandle   DWORD      ?
  dwContextId   DWORD      ?
  MousePos      POINT     <>
HELPINFO ends

ANIMATIONINFO struct
  cbSize        DWORD      ?
  iMinAnimate   DWORD      ?
ANIMATIONINFO ends

MINIMIZEDMETRICS struct
  cbSize    DWORD      ?
  iWidth    DWORD      ?
  iHorzGap  DWORD      ?
  iVertGap  DWORD      ?
  iArrange  DWORD      ?
MINIMIZEDMETRICS ends

OSVERSIONINFOA struct
  dwOSVersionInfoSize   DWORD      ?
  dwMajorVersion        DWORD      ?
  dwMinorVersion        DWORD      ?
  dwBuildNumber         DWORD      ?
  dwPlatformId          DWORD      ?
  szCSDVersion          TCHAR 128 dup (?)
OSVERSIONINFOA ends

SYSTEM_POWER_STATUS struct
  ACLineStatus          BYTE      ?
  BatteryFlag           BYTE      ?
  BatteryLifePercent    BYTE      ?
  Reserved1             BYTE      ?
  BatteryLifeTime       DWORD      ?
  BatteryFullLifeTime   DWORD      ?
SYSTEM_POWER_STATUS ends

PAGESETUPDLG struct
  lStructSize               DWORD      ?
  hwndOwner                 DWORD      ?
  hDevMode                  DWORD      ?
  hDevNames                 DWORD      ?
  union
    Flags                     DWORD      ?
    flags dd ?
  ends
  ptPaperSize               POINT     <>
  rtMinMargin               RECT      <>
  rtMargin                  RECT      <>
  hInstance                 DWORD      ?
  lCustData                 DWORD      ?
  lpfnPageSetupHook         DWORD      ?
  lpfnPagePaintHook         DWORD      ?
  lpPageSetupTemplateName   DWORD      ?
  hPageSetupTemplate        DWORD      ?
PAGESETUPDLG ends

;BITRECORD RECORD fBinary:1,fParity:1,fOutxCtsFlow:1,fOutxDsrFlow:1,fDtrControl:2,fDsrSensitivity:1,fTXContinueOnXoff:1,fOutX:1,fInX:1,fErrorChar:1,fNull:1,fRtsControl:2,fAbortOnError:1,fDummy2:17

DCB struct
  DCBlength     DWORD   ?
  BaudRate      DWORD   ?
  fbits         DWORD   ?;BITRECORD <>
  wReserved     WORD    ?
  XonLim        WORD    ?
  XoffLim       WORD    ?
  ByteSize      BYTE    ?
  Parity        BYTE    ?
  StopBits      BYTE    ?
  XonChar       BYTE    ?
  XoffChar      BYTE    ?
  ErrorChar     BYTE    ?
  EofChar       BYTE    ?
  EvtChar       BYTE    ?
  wReserved1    WORD    ?
DCB ends

COMMCONFIG struct
  dwSize                DWORD      ?
  wVersion              WORD       ?
  wReserved             WORD       ?
  dcbx                  DCB        <>
  dwProviderSubType     DWORD      ?
  dwProviderOffset      DWORD      ?
  dwProviderSize        DWORD      ?
  wcProviderData        WORD       ?
COMMCONFIG ends

PIXELFORMATDESCRIPTOR struct
  nSize             WORD      ?
  nVersion          WORD      ?
  dwFlags           DWORD      ?
  iPixelType        BYTE      ?
  cColorBits        BYTE      ?
  cRedBits          BYTE      ?
  cRedShift         BYTE      ?
  cGreenBits        BYTE      ?
  cGreenShift       BYTE      ?
  cBlueBits         BYTE      ?
  cBlueShift        BYTE      ?
  cAlphaBits        BYTE      ?
  cAlphaShift       BYTE      ?
  cAccumBits        BYTE      ?
  cAccumRedBits     BYTE      ?
  cAccumGreenBits   BYTE      ?
  cAccumBlueBits    BYTE      ?
  cAccumAlphaBits   BYTE      ?
  cDepthBits        BYTE      ?
  cStencilBits      BYTE      ?
  cAuxBuffers       BYTE      ?
  iLayerType        BYTE      ?
  bReserved         BYTE      ?
  dwLayerMask       DWORD      ?
  dwVisibleMask     DWORD      ?
  dwDamageMask      DWORD      ?
PIXELFORMATDESCRIPTOR ends

DRAWTEXTPARAMS struct
  cbSize            DWORD      ?
  iTabiLength       DWORD      ?
  iLeftMargin       DWORD      ?
  iRightMargin      DWORD      ?
  uiiLengthDrawn    DWORD      ?
DRAWTEXTPARAMS ends

MENUITEMINFO struct
  cbSize        DWORD      ?
  fMask         DWORD      ?
  fType         DWORD      ?
  fState        DWORD      ?
  wID           DWORD      ?
  hSubMenu      DWORD      ?
  hbmpChecked   DWORD      ?
  hbmpUnchecked DWORD      ?
  dwItemData    DWORD      ?
  dwTypeData    DWORD      ?
  cch           DWORD      ?
MENUITEMINFO ends

SCROLLINFO struct
  cbSize        DWORD      ?
  fMask         DWORD      ?
  nMin          DWORD      ?
  nMax          DWORD      ?
  nPage         DWORD      ?
  nPos          DWORD      ?
  nTrackPos     DWORD      ?
SCROLLINFO ends

DEBUGSTRUCT union
  Exception         EXCEPTION_DEBUG_INFO
  CreateThread      CREATE_THREAD_DEBUG_INFO
  CreateProcessInfo CREATE_PROCESS_DEBUG_INFO
  ExitThread        EXIT_THREAD_DEBUG_INFO
  ExitProcess       EXIT_PROCESS_DEBUG_INFO
  LoadDll           LOAD_DLL_DEBUG_INFO
  UnloadDll         UNLOAD_DLL_DEBUG_INFO
  DebugString       OUTPUT_DEBUG_STRING_INFO
  RipInfo           RIP_INFO
DEBUGSTRUCT ends

DEBUG_EVENT struct
  dwDebugEventCode  DWORD       ?
  dwProcessId       DWORD       ?
  dwThreadId        DWORD       ?
  u                 DEBUGSTRUCT <>
DEBUG_EVENT ends

IMAGE_DATA_DIRECTORY struct
  VirtualAddress    DWORD      ?
  isize             DWORD      ?
IMAGE_DATA_DIRECTORY ends

IMAGE_OPTIONAL_HEADER32 struct
  Magic                         WORD       ?
  MajorLinkerVersion            BYTE       ?
  MinorLinkerVersion            BYTE       ?
  SizeOfCode                    DWORD      ?
  SizeOfInitializedData         DWORD      ?
  SizeOfUninitializedData       DWORD      ?
  AddressOfEntryPoint           DWORD      ?
  BaseOfCode                    DWORD      ?
  BaseOfData                    DWORD      ?
  ImageBase                     DWORD      ?
  SectionAlignment              DWORD      ?
  FileAlignment                 DWORD      ?
  MajorOperatingSystemVersion   WORD       ?
  MinorOperatingSystemVersion   WORD       ?
  MajorImageVersion             WORD       ?
  MinorImageVersion             WORD       ?
  MajorSubsystemVersion         WORD       ?
  MinorSubsystemVersion         WORD       ?
  Win32VersionValue             DWORD      ?
  SizeOfImage                   DWORD      ?
  SizeOfHeaders                 DWORD      ?
  CheckSum                      DWORD      ?
  Subsystem                     WORD       ?
  DllCharacteristics            WORD       ?
  SizeOfStackReserve            DWORD      ?
  SizeOfStackCommit             DWORD      ?
  SizeOfHeapReserve             DWORD      ?
  SizeOfHeapCommit              DWORD      ?
  LoaderFlags                   DWORD      ?
  NumberOfRvaAndSizes           DWORD      ?
  DataDirectory                 IMAGE_DATA_DIRECTORY IMAGE_NUMBEROF_DIRECTORY_ENTRIES dup(<>)
IMAGE_OPTIONAL_HEADER32 ends
TYPEDEF IMAGE_OPTIONAL_HEADER, IMAGE_OPTIONAL_HEADER32

IMAGE_FILE_HEADER struct
  Machine               WORD    ?
  NumberOfSections      WORD    ?
  TimeDateStamp         DWORD   ?
  PointerToSymbolTable  DWORD   ?
  NumberOfSymbols       DWORD   ?
  SizeOfOptionalHeader  WORD    ?
  Characteristics       WORD    ?
IMAGE_FILE_HEADER ends

IMAGE_NT_HEADERS struct
  Signature         DWORD                   ?
  FileHeader        IMAGE_FILE_HEADER       <>
  OptionalHeader    IMAGE_OPTIONAL_HEADER32 <>
IMAGE_NT_HEADERS ends

IMAGE_EXPORT_DIRECTORY struct
  Characteristics           DWORD      ?
  TimeDateStamp             DWORD      ?
  MajorVersion              WORD       ?
  MinorVersion              WORD       ?
  nName                     DWORD      ?
  nBase                     DWORD      ?
  NumberOfFunctions         DWORD      ?
  NumberOfNames             DWORD      ?
  AddressOfFunctions        DWORD      ?
  AddressOfNames            DWORD      ?
  AddressOfNameOrdinals     DWORD      ?
IMAGE_EXPORT_DIRECTORY ends

IMAGE_DOS_HEADER struct
  e_magic           WORD      ?
  e_cblp            WORD      ?
  e_cp              WORD      ?
  e_crlc            WORD      ?
  e_cparhdr         WORD      ?
  e_minalloc        WORD      ?
  e_maxalloc        WORD      ?
  e_ss              WORD      ?
  e_sp              WORD      ?
  e_csum            WORD      ?
  e_ip              WORD      ?
  e_cs              WORD      ?
  e_lfarlc          WORD      ?
  e_ovno            WORD      ?
  e_res             WORD   4 dup(?)
  e_oemid           WORD      ?
  e_oeminfo         WORD      ?
  e_res2            WORD  10 dup(?)
  e_lfanew          DWORD      ?
IMAGE_DOS_HEADER ends

; -----------------------------------------
; additional structures 24th November 2002
; -----------------------------------------
;_GUID struct
;  Data1           DWORD ?
;  Data2           WORD ?
;  Data3           WORD ?
;  Data4           BYTE 8 dup (?)
;_GUID ends

QUOTA_LIMITS struct
  PagedPoolLimit  DWORD ?
  NonPagedPoolLimit DWORD ?
  MinimumWorkingSetSize DWORD ?
  MaximumWorkingSetSize DWORD ?
  PagefileLimit   DWORD ?
  TimeLimit       LARGE_INTEGER <>
QUOTA_LIMITS ends

JOBOBJECT_BASIC_ACCOUNTING_INFORMATION struct
  TotalUserTime   LARGE_INTEGER <>
  TotalKernelTime LARGE_INTEGER <>
  ThisPeriodTotalUserTime LARGE_INTEGER <>
  ThisPeriodTotalKernelTime LARGE_INTEGER <>
  TotalPageFaultCount DWORD ?
  TotalProcesses  DWORD ?
  ActiveProcesses DWORD ?
  TotalTerminatedProcesses DWORD ?
JOBOBJECT_BASIC_ACCOUNTING_INFORMATION ends

JOBOBJECT_BASIC_LIMIT_INFORMATION struct
  PerProcessUserTimeLimit LARGE_INTEGER <>
  PerJobUserTimeLimit LARGE_INTEGER <>
  LimitFlags      DWORD ?
  MinimumWorkingSetSize DWORD ?
  MaximumWorkingSetSize DWORD ?
  ActiveProcessLimit DWORD ?
  Affinity        DWORD ?
  PriorityClass   DWORD ?
JOBOBJECT_BASIC_LIMIT_INFORMATION ends

JOBOBJECT_BASIC_PROCESS_ID_LIST struct
  NumberOfAssignedProcesses DWORD ?
  NumberOfProcessIdsInList DWORD ?
  ProcessIdList   DWORD 1 dup (?)
JOBOBJECT_BASIC_PROCESS_ID_LIST ends

JOBOBJECT_BASIC_UI_RESTRICTIONS struct
  UIRestrictionsClass DWORD ?
JOBOBJECT_BASIC_UI_RESTRICTIONS ends

JOBOBJECT_END_OF_JOB_TIME_INFORMATION struct
  EndOfJobTimeAction DWORD ?
JOBOBJECT_END_OF_JOB_TIME_INFORMATION ends

JOBOBJECT_ASSOCIATE_COMPLETION_PORT struct
  CompletionKey   DWORD ?
  CompletionPort  DWORD ?
JOBOBJECT_ASSOCIATE_COMPLETION_PORT ends

IMAGE_OS2_HEADER struct
  ne_magic        WORD ?
  ne_ver          BYTE ?
  ne_rev          BYTE ?
  ne_enttab       WORD ?
  ne_cbenttab     WORD ?
  ne_crc          DWORD ?
  ne_flags        WORD ?
  ne_autodata     WORD ?
  ne_heap         WORD ?
  ne_stack        WORD ?
  ne_csip         DWORD ?
  ne_sssp         DWORD ?
  ne_cseg         WORD ?
  ne_cmod         WORD ?
  ne_cbnrestab    WORD ?
  ne_segtab       WORD ?
  ne_rsrctab      WORD ?
  ne_restab       WORD ?
  ne_modtab       WORD ?
  ne_imptab       WORD ?
  ne_nrestab      DWORD ?
  ne_cmovent      WORD ?
  ne_align        WORD ?
  ne_cres         WORD ?
  ne_exetyp       BYTE ?
  ne_flagsothers  BYTE ?
  ne_pretthunks   WORD ?
  ne_psegrefbytes WORD ?
  ne_swaparea     WORD ?
  ne_expver       WORD ?
IMAGE_OS2_HEADER ends

IMAGE_NT_HEADERS32 struct
  Signature       DWORD ?
  FileHeader      IMAGE_FILE_HEADER <>
  OptionalHeader  IMAGE_OPTIONAL_HEADER32 <>
IMAGE_NT_HEADERS32 ends

IMAGE_STUB_DIRECTORY struct
  SecondaryImportAddressTable DWORD ?
  ExpectedISA     WORD 2 dup (?)
  StubAddressTable DWORD 2 dup (?)
IMAGE_STUB_DIRECTORY ends

RECOVERY_AGENT_INFORMATION struct
  NextEntryOffset DWORD ?
  AgentNameLength DWORD ?
  AgentInformation TCHAR 1 dup (?)
RECOVERY_AGENT_INFORMATION ends

WIN32_FILE_ATTRIBUTE_DATA struct
  dwFileAttributes DWORD ?
  ftCreationTime  FILETIME <>
  ftLastAccessTime FILETIME <>
  ftLastWriteTime FILETIME <>
  nFileSizeHigh   DWORD ?
  nFileSizeLow    DWORD ?
WIN32_FILE_ATTRIBUTE_DATA ends

OSVERSIONINFOEX struct
  dwOSVersionInfoSize DWORD ?
  dwMajorVersion  DWORD ?
  dwMinorVersion  DWORD ?
  dwBuildNumber   DWORD ?
  dwPlatformId    DWORD ?
  szCSDVersion    TCHAR  128  dup (?)
  wServicePackMajor WORD ?
  wServicePackMinor WORD ?
  wSuiteMask        WORD ?
  wProductType      BYTE ?
  wReserved         BYTE ?
OSVERSIONINFOEX ends

WIN_CERTIFICATE struct
  dwLength        DWORD ?
  wRevision       WORD ?
  wCertificateType WORD ?
  bCertificate    BYTE 1 dup (?)
WIN_CERTIFICATE ends

DRAWPATRECT struct
  ptPosition      POINT <>
  ptSize          POINT <>
  wStyle          WORD ?
  wPattern        WORD ?
DRAWPATRECT ends

PSINJECTDATA struct
  DataBytes       DWORD ?
  InjectionPoint  DWORD ?
  Flags           DWORD ?
  Reserved        DWORD ?
PSINJECTDATA ends

DISPLAY_DEVICE struct
  cb              DWORD ?
  DeviceName      TCHAR 32  dup (?)
  DeviceString    TCHAR 128 dup (?)
  StateFlags      DWORD ?
  DeviceID        TCHAR 128 dup (?)
  DeviceKey       TCHAR 128 dup (?)
DISPLAY_DEVICE ends

TRIVERTEX struct
  x               DWORD ?
  y               DWORD ?
  Red             WORD ?
  Green           WORD ?
  Blue            WORD ?
  Alpha           WORD ?
TRIVERTEX ends

GRADIENT_TRIANGLE struct
  Vertex1         DWORD ?
  Vertex2         DWORD ?
  Vertex3         DWORD ?
GRADIENT_TRIANGLE ends

GRADIENT_RECT struct
  UpperLeft       DWORD ?
  LowerRight      DWORD ?
GRADIENT_RECT ends

BLENDFUNCTION struct
  BlendOp         BYTE ?
  BlendFlags      BYTE ?
  SourceConstantAlpha BYTE ?
  AlphaFormat     BYTE ?
BLENDFUNCTION ends

DIBSECTION struct
  dsBm            BITMAP <>
  dsBmih          BITMAPINFOHEADER <>
  dsBitfields     DWORD 3 dup (?)
  dshSection      DWORD ?
  dsOffset        DWORD ?
DIBSECTION ends

EMRFORMAT struct
  dSignature      DWORD ?
  nVersion        DWORD ?
  cbData          DWORD ?
  offData         DWORD ?
EMRFORMAT ends

EMRGLSRECORD struct
  emr             EMR <>
  cbData          DWORD ?
  Data            BYTE 1 dup (?)
EMRGLSRECORD ends

EMRGLSBOUNDEDRECORD struct
  emr             EMR <>
  rclBounds       RECTL <>
  cbData          DWORD ?
  Data            BYTE 1 dup (?)
EMRGLSBOUNDEDRECORD ends

EMRPIXELFORMAT struct
  emr             EMR <>
  pfd             PIXELFORMATDESCRIPTOR <>
EMRPIXELFORMAT ends

EMRSETICMPROFILE struct
  emr             EMR <>
  dwFlags         DWORD ?
  cbName          DWORD ?
  cbData          DWORD ?
  Data            BYTE 1 dup (?)
EMRSETICMPROFILE ends

POINTFLOAT struct
  x               FLOAT ?
  y               FLOAT ?
POINTFLOAT ends

GLYPHMETRICSFLOAT struct
  gmfBlackBoxX    FLOAT ?
  gmfBlackBoxY    FLOAT ?
  gmfptGlyphOrigin POINTFLOAT <>
  gmfCellIncX     FLOAT ?
  gmfCellIncY     FLOAT ?
GLYPHMETRICSFLOAT ends

LAYERPLANEDESCRIPTOR struct
  nSize           WORD ?
  nVersion        WORD ?
  dwFlags         DWORD ?
  iPixelType      BYTE ?
  cColorBits      BYTE ?
  cRedBits        BYTE ?
  cRedShift       BYTE ?
  cGreenBits      BYTE ?
  cGreenShift     BYTE ?
  cBlueBits       BYTE ?
  cBlueShift      BYTE ?
  cAlphaBits      BYTE ?
  cAlphaShift     BYTE ?
  cAccumBits      BYTE ?
  cAccumRedBits   BYTE ?
  cAccumGreenBits BYTE ?
  cAccumBlueBits  BYTE ?
  cAccumAlphaBits BYTE ?
  cDepthBits      BYTE ?
  cStencilBits    BYTE ?
  cAuxBuffers     BYTE ?
  iLayerPlane     BYTE ?
  bReserved       BYTE ?
  crTransparent   DWORD ?
LAYERPLANEDESCRIPTOR ends

CPINFOEX struct
  MaxCharSize     DWORD ?
  DefaultChar     BYTE 2 dup (?)
  LeadByte        BYTE 12 dup (?)
  UnicodeDefaultChar WORD ?
  CodePage        DWORD ?
  CodePageName    TCHAR 260 dup (?)
CPINFOEX ends

PVALUE struct
  pv_valuename    DWORD ?
  pv_valuelen     DWORD ?
  pv_value_context DWORD ?
  pv_type         DWORD ?
PVALUE ends

VALENT struct
  ve_valuename    DWORD ?
  ve_valuelen     DWORD ?
  ve_valueptr     DWORD ?
  ve_type         DWORD ?
VALENT ends

DISCDLGSTRUCT struct
  cbStructure     DWORD ?
  hwndOwner       DWORD ?
  lpLocalName     DWORD ?
  lpRemoteName    DWORD ?
  dwFlags         DWORD ?
DISCDLGSTRUCT ends

UNIVERSAL_NAME_INFO struct
  lpUniversalName DWORD ?
UNIVERSAL_NAME_INFO ends

REMOTE_NAME_INFO struct
  lpUniversalName DWORD ?
  lpConnectionName DWORD ?
  lpRemainingPath DWORD ?
REMOTE_NAME_INFO ends

NETINFOSTRUCT struct
  cbStructure     DWORD ?
  dwProviderVersion DWORD ?
  dwStatus        DWORD ?
  dwCharacteristics DWORD ?
  dwHandle        DWORD ?
  wNetType        WORD ?
  dwPrinters      DWORD ?
  dwDrives        DWORD ?
NETINFOSTRUCT ends

NETCONNECTINFOSTRUCT struct
  cbStructure     DWORD ?
  dwFlags         DWORD ?
  dwSpeed         DWORD ?
  dwDelay         DWORD ?
  dwOptDataSize   DWORD ?
NETCONNECTINFOSTRUCT ends

MENUINFO struct
  cbSize          DWORD ?
  fMask           DWORD ?
  dwStyle         DWORD ?
  cyMax           DWORD ?
  hbrBack         DWORD ?
  dwContextHelpID DWORD ?
  dwMenuData      DWORD ?
MENUINFO ends

  ; Structures from WinUser.h

WTSSESSION_NOTIFICATION struct
   cbSize                 DWORD ?
   dwSessionId            DWORD ?
WTSSESSION_NOTIFICATION ends

SHELLHOOKINFO struct
   hwnd                   DWORD ?
   rc                     RECT <>
SHELLHOOKINFO ends

KBDLLHOOKSTRUCT struct
   vkCode                 DWORD ?
   scanCode               DWORD ?
   flags                  DWORD ?
   time                   DWORD ?
   dwExtraInfo            DWORD ?
KBDLLHOOKSTRUCT ends

MSLLHOOKSTRUCT struct
   pt                     POINT <>
   mouseData              DWORD ?
   flags                  DWORD ?
   time                   DWORD ?
   dwExtraInfo            DWORD ?
MSLLHOOKSTRUCT ends

MOUSEHOOKSTRUCTEX struct
   mouseData              DWORD ?
MOUSEHOOKSTRUCTEX ends

MOUSEMOVEPOINT struct
   x                      DWORD ?
   y                      DWORD ?
   time                   DWORD ?
   dwExtraInfo            DWORD ?
MOUSEMOVEPOINT ends

POWERBROADCAST_SETTING struct
   PowerSetting           GUID <>
   DataLength             DWORD ?
   Data BYTE 1 dup (?)
POWERBROADCAST_SETTING ends

BSMINFO struct
   cbSize                 DWORD ?
   hdesk                  DWORD ?
   hwnd                   DWORD ?
   luid                   DWORD ?
BSMINFO ends

MOUSEINPUT struct
   _dx                    DWORD ?
   dy                     DWORD ?
   mouseData              DWORD ?
   dwFlags                DWORD ?
   time                   DWORD ?
   dwExtraInfo            DWORD ?
MOUSEINPUT ends

KEYBDINPUT struct
   wVk                    WORD ?
   wScan                  WORD ?
   dwFlags                DWORD ?
   time                   DWORD ?
   dwExtraInfo            DWORD ?
KEYBDINPUT ends

HARDWAREINPUT struct
   uMsg                   DWORD ?
   wParamL                WORD ?
   wParamH                WORD ?
HARDWAREINPUT ends

LASTINPUTINFO struct
   cbSize                 DWORD ?
   dwTime                 DWORD ?
LASTINPUTINFO ends

MENUGETOBJECTINFO struct
   dwFlags                DWORD ?
   uPos                   DWORD ?
   hmenu                  DWORD ?
   riid                   DWORD ?
   pvObj                  DWORD ?
MENUGETOBJECTINFO ends

MSGBOXPARAMS struct
   cbSize                 DWORD ?
   hwndOwner              DWORD ?
   hInstance              DWORD ?
   lpszText               DWORD ?
   lpszCaption            DWORD ?
   dwStyle                DWORD ?
   lpszIcon               DWORD ?
   dwContextHelpId        DWORD ?
   lpfnMsgBoxCallback     DWORD ?
   dwLanguageId           DWORD ?
MSGBOXPARAMS ends

ICONINFOEX struct
   cbSize                 DWORD ?
   fIcon                  DWORD ?
   xHotspot               DWORD ?
   yHotspot               DWORD ?
   hbmMask                DWORD ?
   hbmColor               DWORD ?
   wResID                 WORD ?
   szModName TCHAR MAX_PATH dup (?)
   szResName TCHAR MAX_PATH dup (?)
ICONINFOEX ends

AUDIODESCRIPTION struct
   cbSize                 DWORD ?
   Enabled                DWORD ?
   Locale                 DWORD ?
AUDIODESCRIPTION ends

MONITORINFO struct
   cbSize                 DWORD ?
   rcMonitor              RECT <>
   rcWork                 RECT <>
   dwFlags                DWORD ?
MONITORINFO ends

MONITORINFOEX struct
   szDevice TCHAR CCHDEVICENAME dup (?)
MONITORINFOEX ends

GUITHREADINFO struct
   cbSize                 DWORD ?
   flags                  DWORD ?
   hwndActive             DWORD ?
   hwndFocus              DWORD ?
   hwndCapture            DWORD ?
   hwndMenuOwner          DWORD ?
   hwndMoveSize           DWORD ?
   hwndCaret              DWORD ?
   rcCaret                RECT <>
GUITHREADINFO ends

CURSORINFO struct
   cbSize                 DWORD ?
   flags                  DWORD ?
   hCursor                DWORD ?
   ptScreenPos            POINT <>
CURSORINFO ends

MENUBARINFO struct
   cbSize                 DWORD ?
   rcBar                  RECT <>
   hMenu                  DWORD ?
   hwndMenu               DWORD ?
   fBarFocused            DWORD ?
   fFocused               DWORD ?
MENUBARINFO ends

COMBOBOXINFO struct
   cbSize                 DWORD ?
   rcItem                 RECT <>
   rcButton               RECT <>
   stateButton            DWORD ?
   hwndCombo              DWORD ?
   hwndItem               DWORD ?
   hwndList               DWORD ?
COMBOBOXINFO ends

ALTTABINFO struct
   cbSize                 DWORD ?
   cItems                 DWORD ?
   cColumns               DWORD ?
   cRows                  DWORD ?
   iColFocus              DWORD ?
   iRowFocus              DWORD ?
   cxItem                 DWORD ?
   cyItem                 DWORD ?
   ptStart                POINT <>
ALTTABINFO ends

RAWINPUTHEADER struct
   dwType                 DWORD ?
   dwSize                 DWORD ?
   hDevice                DWORD ?
   wParam                 DWORD ?
RAWINPUTHEADER ends

RAWKEYBOARD struct
   MakeCode               WORD ?
   Flags                  WORD ?
   Reserved               WORD ?
   VKey                   WORD ?
   Message                DWORD ?
   ExtraInformation       DWORD ?
RAWKEYBOARD ends

RAWHID struct
   dwSizeHid              DWORD ?
   dwCount                DWORD ?
   bRawData               BYTE 1 dup (?)
RAWHID ends

RID_DEVICE_INFO_MOUSE struct
   dwId                   DWORD ?
   dwNumberOfButtons      DWORD ?
   dwSampleRate           DWORD ?
   fHasHorizontalWheel    DWORD ?
RID_DEVICE_INFO_MOUSE ends

RID_DEVICE_INFO_KEYBOARD struct
   dwType                 DWORD ?
   dwSubType              DWORD ?
   dwKeyboardMode         DWORD ?
   dwNumberOfFunctionKeys DWORD ?
   dwNumberOfIndicators   DWORD ?
   dwNumberOfKeysTotal    DWORD ?
RID_DEVICE_INFO_KEYBOARD ends

RID_DEVICE_INFO_HID struct
   dwVendorId             DWORD ?
   dwProductId            DWORD ?
   dwVersionNumber        DWORD ?
   usUsagePage            WORD ?
   usUsage                WORD ?
RID_DEVICE_INFO_HID ends

RAWINPUTDEVICE struct
   usUsagePage            WORD ?
   usUsage                WORD ?
   dwFlags                DWORD ?
   hwndTarget             DWORD ?
RAWINPUTDEVICE ends

RAWINPUTDEVICELIST struct
   hDevice                DWORD ?
   dwType                 DWORD ?
RAWINPUTDEVICELIST ends


;;;; end win32st

;;;; winuser

; *************** equates and structures from winuser.h *******************

DIFFERENCE        = 11
RT_GROUP_CURSOR     = RT_CURSOR + DIFFERENCE
RT_GROUP_ICON   = RT_ICON + DIFFERENCE
RT_VERSION      = 16
RT_DLGINCLUDE   = 17
RT_PLUGPLAY     = 19
RT_VXD      = 20
RT_ANICURSOR    = 21
RT_ANIICON      = 22
RT_HTML         = 23
AW_HOR_POSITIVE     = 1h
AW_HOR_NEGATIVE     = 2h
AW_VER_POSITIVE     = 4h
AW_VER_NEGATIVE     = 8h
AW_CENTER       = 10h
AW_HIDE         = 10000h
AW_ACTIVATE     = 20000h
AW_SLIDE        = 40000h
AW_BLEND        = 80000h
VK_KANA         = 15h
VK_HANGEUL      = 15h
VK_HANGUL       = 15h
VK_JUNJA        = 17h
VK_FINAL        = 18h
VK_HANJA        = 19h
VK_KANJI        = 19h
VK_CONVERT      = 1Ch
VK_NONCONVERT   = 1Dh
VK_ACCEPT       = 1Eh
VK_MODECHANGE   = 1Fh
VK_LWIN         = 5Bh
VK_RWIN         = 5Ch
VK_APPS         = 5Dh
WH_CALLWNDPROCRET = 12
WH_KEYBOARD_LL  = 13
WH_MOUSE_LL     = 14
WH_MINHOOK      = WH_MIN
WH_MAXHOOK      = WH_MAX
MSGF_DIALOGBOX  = 0
MSGF_MESSAGEBOX     = 1
MSGF_MENU       = 2
MSGF_SCROLLBAR  = 5
MSGF_NEXTWINDOW     = 6
MSGF_MAX        = 8
MSGF_USER       = 4096
HSHELL_WINDOWACTIVATED      = 4
HSHELL_GETMINRECT       = 5
HSHELL_REDRAW           = 6
HSHELL_TASKMAN          = 7
HSHELL_LANGUAGE             = 8
HSHELL_ACCESSIBILITYSTATE   = 11
ACCESS_STICKYKEYS       = 1
ACCESS_FILTERKEYS       = 2
ACCESS_MOUSEKEYS            = 3
LLKHF_EXTENDED          = 1
LLKHF_INJECTED          = 10h
LLKHF_ALTDOWN           = 20h
LLKHF_UP                = 80h
LLMHF_INJECTED          = 1
KLF_REPLACELANG             = 10h
KLF_NOTELLSHELL             = 80h
KLF_SETFORPROCESS       = 100h
GMMP_USE_DISPLAY_POINTS     = 1
GMMP_USE_DRIVER_POINTS      = 2
DESKTOP_SWITCHDESKTOP       = 100h
DF_ALLOWOTHERACCOUNTHOOK    = 1
WSF_VISIBLE             = 1
UOI_FLAGS               = 1
UOI_NAME                = 2
UOI_TYPE                = 3
UOI_USER_SID            = 4
GCL_HICONSM             = -34
NFR_ANSI                = 1
NFR_UNICODE             = 2
NF_QUERY                = 3
NF_REQUERY              = 4
WM_MENURBUTTONUP            = 122h
WM_MENUDRAG = 0123h
WM_MENUGETOBJECT            = 124h
WM_UNINITMENUPOPUP      = 125h
WM_MENUCOMMAND          = 126h
WM_MOUSEWHEEL           = 20Ah
WHEEL_DELTA             = 120
WHEEL_PAGESCROLL            = UINT_MAX
WM_NEXTMENU             = 213h
WM_SIZING               = 214h
WM_CAPTURECHANGED       = 215h
WM_MOVING               = 216h
WM_POWERBROADCAST       = 218h
PBT_APMQUERYSUSPEND         = 0
PBT_APMQUERYSTANDBY         = 1
PBT_APMQUERYSUSPENDFAILED   = 2
PBT_APMQUERYSTANDBYFAILED   = 3
PBT_APMSUSPEND          = 4
PBT_APMSTANDBY          = 5
PBT_APMRESUMECRITICAL       = 6
PBT_APMRESUMESUSPEND        = 7
PBT_APMRESUMESTANDBY        = 8
PBTF_APMRESUMEFROMFAILURE   = 1
PBT_APMBATTERYLOW       = 9
PBT_APMPOWERSTATUSCHANGE    = 0Ah
PBT_APMOEMEVENT             = 0Bh
PBT_APMRESUMEAUTOMATIC      = 12h
WM_DEVICECHANGE             = 219h
WM_ENTERSIZEMOVE            = 231h
WM_EXITSIZEMOVE             = 232h
WM_MOUSEHOVER           = 2A1h
WM_MOUSELEAVE           = 2A3h
WM_HANDHELDFIRST            = 358h
WM_HANDHELDLAST             = 35Fh
WM_AFXFIRST             = 360h
WM_AFXLAST              = 37Fh
WM_APP              = 8000h
WMSZ_LEFT               = 1
WMSZ_RIGHT              = 2
WMSZ_TOP                = 3
WMSZ_TOPLEFT            = 4
WMSZ_TOPRIGHT           = 5
WMSZ_BOTTOM             = 6
WMSZ_BOTTOMLEFT             = 7
WMSZ_BOTTOMRIGHT            = 8
ICON_SMALL              = 0
ICON_BIG                = 1
TME_HOVER               = 1
TME_LEAVE               = 2
TME_QUERY               = 40000000h
TME_CANCEL              = 80000000h
DC_ACTIVE               = 1
DC_SMALLCAP             = 2
DC_ICON                 = 4
DC_TEXT                 = 8
DC_INBUTTON             = 10h
DC_GRADIENT             = 20h
IDANI_OPEN              = 1
IDANI_CLOSE             = 2
IDANI_CAPTION           = 3
ENDSESSION_LOGOFF       = 80000000h
BSM_ALLCOMPONENTS       = 0
BSM_VXDS                = 1
BSM_NETDRIVER           = 2
BSM_INSTALLABLEDRIVERS      = 4
BSM_APPLICATIONS            = 8
BSM_ALLDESKTOPS             = 10h
BSF_QUERY               = 1
BSF_IGNORECURRENTTASK       = 2
BSF_FLUSHDISK           = 4
BSF_NOHANG              = 8
BSF_POSTMESSAGE             = 10h
BSF_FORCEIFHUNG             = 20h
BSF_NOTIMEOUTIFNOTHUNG      = 40h
BROADCAST_QUERY_DENY        = 424D5144h
DEVICE_NOTIFY_WINDOW_HANDLE     = 0
ISMEX_NOSEND            = 0
ISMEX_SEND              = 1h
ISMEX_NOTIFY            = 2h
ISMEX_CALLBACK          = 4h
ISMEX_REPLIED           = 8h
FLASHW_STOP             = 0
FLASHW_CAPTION          = 1
FLASHW_TRAY             = 2
FLASHW_ALL              = FLASHW_CAPTION + FLASHW_TRAY
FLASHW_TIMER            = 4
FLASHW_TIMERNOFG            = 0Ch
INPUT_MOUSE             = 0
INPUT_KEYBOARD          = 1
INPUT_HARDWARE          = 2
MWMO_WAITALL            = 1
MWMO_ALERTABLE          = 2
MWMO_INPUTAVAILABLE         = 4
MNC_IGNORE              = 0
MNC_CLOSE               = 1
MNC_EXECUTE             = 2
MNC_SELECT              = 3
MNS_NOCHECK             = 80000000h
MNS_MODELESS            = 40000000h
MNS_DRAGDROP            = 20000000h
MNS_AUTODISMISS             = 10000000h
MNS_NOTIFYBYPOS             = 08000000h
MNS_CHECKORBMP          = 04000000h
MIM_MAXHEIGHT           = 1
MIM_BACKGROUND          = 2
MIM_HELPID              = 4
MIM_MENUDATA            = 8
MIM_STYLE               = 10h
MIM_APPLYTOSUBMENUS         = 80000000h
MND_CONTINUE            = 0
MND_ENDMENU             = 1
MNGOF_GAP               = 3
MNGO_NOINTERFACE            = 0
MNGO_NOERROR            = 1
MIIM_STATE              = 1
MIIM_ID                 = 2
MIIM_SUBMENU            = 4
MIIM_CHECKMARKS             = 8
MIIM_TYPE               = 10h
MIIM_DATA               = 20h
MIIM_STRING             = 40h
MIIM_BITMAP             = 80h
MIIM_FTYPE              = 100h
HBMMENU_CALLBACK            = -1
HBMMENU_SYSTEM          = 1
HBMMENU_MBAR_RESTORE        = 2
HBMMENU_MBAR_MINIMIZE       = 3
HBMMENU_MBAR_CLOSE      = 5
HBMMENU_MBAR_CLOSE_D        = 6
HBMMENU_MBAR_MINIMIZE_D     = 7
HBMMENU_POPUP_CLOSE         = 8
HBMMENU_POPUP_RESTORE       = 9
HBMMENU_POPUP_MAXIMIZE      = 10
HBMMENU_POPUP_MINIMIZE      = 11
GMDI_USEDISABLED            = 1
GMDI_GOINTOPOPUPS       = 2
DOF_EXECUTABLE          = 8001h
DOF_DOCUMENT            = 8002h
DOF_DIRECTORY           = 8003h
DOF_MULTIPLE            = 8004h
DOF_PROGMAN             = 1
DOF_SHELLDATA           = 2
DO_DROPFILE             = 454C4946h
DO_PRINTFILE            = 544E5250h
DST_COMPLEX             = 0
DST_TEXT                = 1
DST_PREFIXTEXT          = 2
DST_ICON                = 3
DST_BITMAP              = 4
DSS_NORMAL              = 0
DSS_UNION               = 10h
DSS_DISABLED            = 20h
DSS_MONO                = 80h
DSS_RIGHT               = 8000h
CUDR_NORMAL             = 0
CUDR_NOSNAPTOGRID       = 1
CUDR_NORESOLVEPOSITIONS     = 2
CUDR_NOCLOSEGAPS            = 4
CUDR_NEGATIVECOORDS         = 8
CUDR_NOPRIMARY          = 10h
CWP_ALL                 = 0
CWP_SKIPINVISIBLE       = 1
CWP_SKIPDISABLED            = 2
CWP_SKIPTRANSPARENT         = 4
MFT_STRING              = MF_STRING
MFT_BITMAP              = MF_BITMAP
MFT_MENUBARBREAK            = MF_MENUBARBREAK
MFT_MENUBREAK           = MF_MENUBREAK
MFT_OWNERDRAW           = MF_OWNERDRAW
MFT_RADIOCHECK          = 200h
MFT_SEPARATOR           = MF_SEPARATOR
MFT_RIGHTORDER          = 2000h
MFT_RIGHTJUSTIFY            = MF_RIGHTJUSTIFY
MFS_GRAYED              = 3
MFS_DISABLED            = MFS_GRAYED
MFS_CHECKED             = MF_CHECKED
MFS_HILITE              = MF_HILITE
MFS_ENABLED             = MF_ENABLED
MFS_UNCHECKED           = MF_UNCHECKED
MFS_UNHILITE            = MF_UNHILITE
MFS_DEFAULT             = MF_DEFAULT
MFS_MASK                = 108Bh
MFS_HOTTRACKDRAWN       = 10000000h
MFS_CACHEDBMP           = 20000000h
MFS_BOTTOMGAPDROP       = 40000000h
MFS_TOPGAPDROP          = 80000000h
MFS_GAPDROP             = 0C0000000h
LR_DEFAULTCOLOR             = 0
LR_MONOCHROME           = 1
LR_COLOR                = 2
LR_COPYRETURNORG            = 4
LR_COPYDELETEORG            = 8
LR_LOADFROMFILE             = 10h
LR_LOADTRANSPARENT      = 20h
LR_DEFAULTSIZE          = 40h
LR_VGACOLOR             = 80h
LR_LOADMAP3DCOLORS      = 1000h
LR_CREATEDIBSECTION         = 2000h
LR_COPYFROMRESOURCE         = 4000h
LR_SHARED               = 8000h
DI_MASK                 = 1
DI_IMAGE                = 2
DI_NORMAL               = 3
DI_COMPAT               = 4
DI_DEFAULTSIZE          = 8
RES_ICON                = 1
RES_CURSOR              = 2
EC_LEFTMARGIN           = 1
EC_RIGHTMARGIN          = 2
EC_USEFONTINFO          = 0ffffh
EMSIS_COMPOSITIONSTRING     = 1
EIMES_GETCOMPSTRATONCE      = 1
EIMES_CANCELCOMPSTRINFOCUS  = 2
EIMES_COMPLETECOMPSTRKILLFOCUS = 4
SS_OWNERDRAW            = 0Dh
SS_BITMAP               = 0Eh
SS_ENHMETAFILE          = 0Fh
SS_ETCHEDHORZ           = 10h
SS_ETCHEDVERT           = 11h
SS_ETCHEDFRAME          = 12h
SS_TYPEMASK             = 1Fh
SS_NOTIFY               = 100h
SS_CENTERIMAGE          = 200h
SS_RIGHTJUST            = 400h
SS_REALSIZEIMAGE            = 800h
SS_SUNKEN               = 1000h
SS_ENDELLIPSIS          = 4000h
SS_PATHELLIPSIS             = 8000h
SS_WORDELLIPSIS             = 0C000h
SS_ELLIPSISMASK             = 0C000h
STM_SETIMAGE            = 172h
STM_GETIMAGE            = 173h
STN_CLICKED             = 0
STN_DBLCLK              = 1
STN_ENABLE              = 2
STN_DISABLE             = 3
DM_REPOSITION           = WM_USER+2
LB_INITSTORAGE          = 1A8h
LB_ITEMFROMPOINT            = 1A9h
LBS_NOSEL               = 4000h
CBS_UPPERCASE           = 2000h
CBS_LOWERCASE           = 4000h
GR_GDIOBJECTS           = 0
GR_USEROBJECTS          = 1
SPI_SETSCREENSAVERRUNNING   = 97
SPI_GETMOUSEHOVERWIDTH      = 98
SPI_SETMOUSEHOVERWIDTH      = 99
SPI_GETMOUSEHOVERHEIGHT     = 100
SPI_SETMOUSEHOVERHEIGHT     = 101
SPI_GETMOUSEHOVERTIME       = 102
SPI_SETMOUSEHOVERTIME       = 103
SPI_GETWHEELSCROLLLINES     = 104
SPI_SETWHEELSCROLLLINES     = 105
SPI_GETSHOWIMEUI            = 110
SPI_SETSHOWIMEUI            = 111
SPI_GETMOUSESPEED       = 112
SPI_SETMOUSESPEED       = 113
SPI_GETSCREENSAVERRUNNING   = 114
SPI_GETACTIVEWINDOWTRACKING     = 1000h
SPI_SETACTIVEWINDOWTRACKING     = 1001h
SPI_GETMENUANIMATION        = 1002h
SPI_SETMENUANIMATION        = 1003h
SPI_GETCOMBOBOXANIMATION    = 1004h
SPI_SETCOMBOBOXANIMATION    = 1005h
SPI_GETLISTBOXSMOOTHSCROLLING = 1006h
SPI_SETLISTBOXSMOOTHSCROLLING = 1007h
SPI_GETGRADIENTCAPTIONS     = 1008h
SPI_SETGRADIENTCAPTIONS     = 1009h
SPI_GETMENUUNDERLINES       = 100Ah
SPI_SETMENUUNDERLINES       = 100Bh
SPI_GETACTIVEWNDTRKZORDER   = 100Ch
SPI_SETACTIVEWNDTRKZORDER   = 100Dh
SPI_GETHOTTRACKING      = 100Eh
SPI_SETHOTTRACKING      = 100Fh
SPI_GETFOREGROUNDLOCKTIMEOUT    = 2000h
SPI_SETFOREGROUNDLOCKTIMEOUT    = 2001h
SPI_GETACTIVEWNDTRKTIMEOUT  = 2002h
SPI_SETACTIVEWNDTRKTIMEOUT  = 2003h
SPI_GETFOREGROUNDFLASHCOUNT     = 2004h
SPI_SETFOREGROUNDFLASHCOUNT     = 2005h
SPIF_SENDCHANGE             = SPIF_SENDWININICHANGE
METRICS_USEDEFAULT      = -1
ARW_BOTTOMLEFT          = 0
ARW_BOTTOMRIGHT             = 1
ARW_TOPLEFT             = 2
ARW_TOPRIGHT            = 3
ARW_STARTMASK           = 3
ARW_STARTRIGHT          = 1
ARW_STARTTOP            = 2
ARW_LEFT                = 0
ARW_RIGHT               = 0
ARW_UP              = 4
ARW_DOWN                = 4
ARW_HIDE                = 8
SERKF_SERIALKEYSON      = 1
SERKF_AVAILABLE             = 2
SERKF_INDICATOR             = 4
HCF_HIGHCONTRASTON      = 1
HCF_AVAILABLE           = 2
HCF_HOTKEYACTIVE            = 4
HCF_CONFIRMHOTKEY       = 8
HCF_HOTKEYSOUND             = 10h
HCF_INDICATOR           = 20h
HCF_HOTKEYAVAILABLE         = 40h
CDS_UPDATEREGISTRY      = 1
CDS_TEST                = 2
CDS_FULLSCREEN          = 4
CDS_GLOBAL              = 8
CDS_SET_PRIMARY             = 10h
CDS_RESET               = 40000000h
CDS_SETRECT             = 20000000h
CDS_NORESET             = 10000000h
DISP_CHANGE_SUCCESSFUL      = 0
DISP_CHANGE_RESTART         = 1
DISP_CHANGE_FAILED      = -1
DISP_CHANGE_BADMODE         = -2
DISP_CHANGE_NOTUPDATED      = -3
DISP_CHANGE_BADFLAGS        = -4
DISP_CHANGE_BADPARAM        = -5
ENUM_CURRENT_SETTINGS       = -1
ENUM_REGISTRY_SETTINGS      = -2
FKF_FILTERKEYSON            = 1
FKF_AVAILABLE           = 2
FKF_HOTKEYACTIVE            = 4
FKF_CONFIRMHOTKEY       = 8
FKF_HOTKEYSOUND             = 10h
FKF_INDICATOR           = 20h
FKF_CLICKON             = 40h
SKF_STICKYKEYSON            = 1
SKF_AVAILABLE           = 2
SKF_HOTKEYACTIVE            = 4
SKF_CONFIRMHOTKEY       = 8
SKF_HOTKEYSOUND             = 10h
SKF_INDICATOR           = 20h
SKF_AUDIBLEFEEDBACK         = 40h
SKF_TRISTATE            = 80h
SKF_TWOKEYSOFF          = 100h
SKF_LALTLATCHED             = 10000000h
SKF_LCTLLATCHED             = 4000000h
SKF_LSHIFTLATCHED       = 1000000h
SKF_RALTLATCHED             = 20000000h
SKF_RCTLLATCHED             = 08000000h
SKF_RSHIFTLATCHED       = 2000000h
SKF_LWINLATCHED             = 40000000h
SKF_RWINLATCHED             = 80000000h
SKF_LALTLOCKED          = 100000h
SKF_LCTLLOCKED          = 40000h
SKF_LSHIFTLOCKED            = 10000h
SKF_RALTLOCKED          = 200000h
SKF_RCTLLOCKED          = 80000h
SKF_RSHIFTLOCKED            = 20000h
SKF_LWINLOCKED          = 400000h
SKF_RWINLOCKED          = 800000h
MKF_MOUSEKEYSON             = 1
MKF_AVAILABLE           = 2
MKF_HOTKEYACTIVE            = 4
MKF_CONFIRMHOTKEY       = 8
MKF_HOTKEYSOUND             = 10h
MKF_INDICATOR           = 20h
MKF_MODIFIERS           = 40h
MKF_REPLACENUMBERS      = 80h
MKF_LEFTBUTTONSEL       = 10000000h
MKF_RIGHTBUTTONSEL      = 20000000h
MKF_LEFTBUTTONDOWN      = 1000000h
MKF_RIGHTBUTTONDOWN         = 2000000h
MKF_MOUSEMODE           = 80000000h
ATF_TIMEOUTON           = 1
ATF_ONOFFFEEDBACK       = 2
SSGF_NONE               = 0
SSGF_DISPLAY            = 3
SSTF_NONE               = 0
SSTF_CHARS              = 1
SSTF_BORDER             = 2
SSTF_DISPLAY            = 3
SSWF_NONE               = 0
SSWF_TITLE              = 1
SSWF_WINDOW             = 2
SSWF_DISPLAY            = 3
SSWF_CUSTOM             = 4
SSF_SOUNDSENTRYON       = 1
SSF_AVAILABLE           = 2
SSF_INDICATOR           = 4
TKF_TOGGLEKEYSON            = 1
TKF_AVAILABLE           = 2
TKF_HOTKEYACTIVE            = 4
TKF_CONFIRMHOTKEY       = 8
TKF_HOTKEYSOUND             = 10h
TKF_INDICATOR           = 20h
MONITOR_DEFAULTTONULL       = 0
MONITOR_DEFAULTTOPRIMARY    = 1
MONITOR_DEFAULTTONEAREST    = 2
MONITORINFOF_PRIMARY        = 1
CHILDID_SELF            = 0
INDEXID_OBJECT          = 0
INDEXID_CONTAINER       = 0
OBJID_WINDOW            = 0
OBJID_SYSMENU           = 0FFFFFFFFh
OBJID_TITLEBAR          = 0FFFFFFFEh
OBJID_MENU              = 0FFFFFFFDh
OBJID_CLIENT            = 0FFFFFFFCh
OBJID_VSCROLL           = 0FFFFFFFBh
OBJID_HSCROLL           = 0FFFFFFFAh
OBJID_SIZEGRIP          = 0FFFFFFF9h
OBJID_CARET             = 0FFFFFFF8h
OBJID_CURSOR            = 0FFFFFFF7h
OBJID_ALERT             = 0FFFFFFF6h
OBJID_SOUND             = 0FFFFFFF5h
EVENT_MIN               = 1
EVENT_MAX               = 7FFFFFFFh
EVENT_SYSTEM_SOUND      = 1
EVENT_SYSTEM_ALERT      = 2
EVENT_SYSTEM_FOREGROUND     = 3
EVENT_SYSTEM_MENUSTART      = 4
EVENT_SYSTEM_MENUEND        = 5
EVENT_SYSTEM_MENUPOPUPSTART     = 6
EVENT_SYSTEM_MENUPOPUPEND   = 7
EVENT_SYSTEM_CAPTURESTART   = 8
EVENT_SYSTEM_CAPTUREEND     = 9
EVENT_SYSTEM_MOVESIZESTART  = 0Ah
EVENT_SYSTEM_MOVESIZEEND    = 0Bh
EVENT_SYSTEM_CONTEXTHELPSTART = 0Ch
EVENT_SYSTEM_CONTEXTHELPEND     = 0Dh
EVENT_SYSTEM_DRAGDROPSTART  = 0Eh
EVENT_SYSTEM_DRAGDROPEND    = 0Fh
EVENT_SYSTEM_DIALOGSTART    = 10h
EVENT_SYSTEM_DIALOGEND      = 11h
EVENT_SYSTEM_SCROLLINGSTART     = 12h
EVENT_SYSTEM_SCROLLINGEND   = 13h
EVENT_SYSTEM_SWITCHSTART    = 14h
EVENT_SYSTEM_SWITCHEND      = 15h
EVENT_SYSTEM_MINIMIZESTART  = 16h
EVENT_SYSTEM_MINIMIZEEND    = 17h
EVENT_OBJECT_CREATE         = 8000h
EVENT_OBJECT_DESTROY        = 8001h
EVENT_OBJECT_SHOW       = 8002h
EVENT_OBJECT_HIDE       = 8003h
EVENT_OBJECT_REORDER        = 8004h
EVENT_OBJECT_FOCUS      = 8005h
EVENT_OBJECT_SELECTION      = 8006h
EVENT_OBJECT_SELECTIONADD   = 8007h
EVENT_OBJECT_SELECTIONREMOVE    = 8008h
EVENT_OBJECT_SELECTIONWITHIN    = 8009h
EVENT_OBJECT_STATECHANGE    = 800Ah
EVENT_OBJECT_LOCATIONCHANGE     = 800Bh
EVENT_OBJECT_NAMECHANGE     = 800Ch
EVENT_OBJECT_DESCRIPTIONCHANGE = 800Dh
EVENT_OBJECT_VALUECHANGE    = 800Eh
EVENT_OBJECT_PARENTCHANGE   = 800Fh
EVENT_OBJECT_HELPCHANGE     = 8010h
EVENT_OBJECT_DEFACTIONCHANGE    = 8011h
EVENT_OBJECT_ACCELERATORCHANGE = 8012h
SOUND_SYSTEM_STARTUP        = 1
SOUND_SYSTEM_SHUTDOWN       = 2
SOUND_SYSTEM_BEEP       = 3
SOUND_SYSTEM_ERROR      = 4
SOUND_SYSTEM_QUESTION       = 5
SOUND_SYSTEM_WARNING        = 6
SOUND_SYSTEM_INFORMATION    = 7
SOUND_SYSTEM_MAXIMIZE       = 8
SOUND_SYSTEM_MINIMIZE       = 9
SOUND_SYSTEM_RESTOREUP      = 10
SOUND_SYSTEM_RESTOREDOWN    = 11
SOUND_SYSTEM_APPSTART       = 12
SOUND_SYSTEM_FAULT      = 13
SOUND_SYSTEM_APPEND         = 14
SOUND_SYSTEM_MENUCOMMAND    = 15
SOUND_SYSTEM_MENUPOPUP      = 16
CSOUND_SYSTEM           = 16
ALERT_SYSTEM_INFORMATIONAL  = 1
ALERT_SYSTEM_WARNING        = 2
ALERT_SYSTEM_ERROR      = 3
ALERT_SYSTEM_QUERY      = 4
ALERT_SYSTEM_CRITICAL       = 5
CALERT_SYSTEM           = 6
WINEVENT_OUTOFCONTEXT       = 0
WINEVENT_SKIPOWNTHREAD      = 1
WINEVENT_SKIPOWNPROCESS     = 2
WINEVENT_INCONTEXT      = 4
GUI_CARETBLINKING       = 1
GUI_INMOVESIZE          = 2
GUI_INMENUMODE          = 4
GUI_SYSTEMMENUMODE      = 8
GUI_POPUPMENUMODE       = 10h
STATE_SYSTEM_UNAVAILABLE    = 1
STATE_SYSTEM_SELECTED       = 2
STATE_SYSTEM_FOCUSED        = 4
STATE_SYSTEM_PRESSED        = 8
STATE_SYSTEM_CHECKED        = 10h
STATE_SYSTEM_MIXED      = 20h
STATE_SYSTEM_READONLY       = 40h
STATE_SYSTEM_HOTTRACKED     = 80h
STATE_SYSTEM_DEFAULT        = 100h
STATE_SYSTEM_EXPANDED       = 200h
STATE_SYSTEM_COLLAPSED      = 400h
STATE_SYSTEM_BUSY       = 800h
STATE_SYSTEM_FLOATING       = 1000h
STATE_SYSTEM_MARQUEED       = 2000h
STATE_SYSTEM_ANIMATED       = 4000h
STATE_SYSTEM_INVISIBLE      = 8000h
STATE_SYSTEM_OFFSCREEN      = 10000h
STATE_SYSTEM_SIZEABLE       = 20000h
STATE_SYSTEM_MOVEABLE       = 40000h
STATE_SYSTEM_SELFVOICING    = 80000h
STATE_SYSTEM_FOCUSABLE      = 100000h
STATE_SYSTEM_SELECTABLE     = 200000h
STATE_SYSTEM_LINKED         = 400000h
STATE_SYSTEM_TRAVERSED      = 800000h
STATE_SYSTEM_MULTISELECTABLE    = 1000000h
STATE_SYSTEM_EXTSELECTABLE  = 2000000h
STATE_SYSTEM_ALERT_LOW      = 4000000h
STATE_SYSTEM_ALERT_MEDIUM   = 8000000h
STATE_SYSTEM_ALERT_HIGH     = 10000000h
STATE_SYSTEM_VALID      = 1FFFFFFFh
CCHILDREN_TITLEBAR      = 5
CCHILDREN_SCROLLBAR         = 5
GA_MIC              = 1
GA_PARENT               = 1
GA_ROOT                 = 2
GA_ROOTOWNER            = 3
GA_MAC              = 4
CURSOR_SHOWING          = 1
WS_ACTIVECAPTION            = 1

APPCOMMAND_DELETE                = 53
APPCOMMAND_DWM_FLIP3D            = 54
UOI_HEAPSIZE                     = 5
UOI_IO                           = 6
WM_INPUT_DEVICE_CHANGE           = 00FEh
WM_INPUT                         = 00FFh
WM_MOUSEHWHEEL                   = 020Eh
PBT_POWERSETTINGCHANGE           = 8013h
WM_CLIPBOARDUPDATE               = 031Dh
WM_DWMCOMPOSITIONCHANGED         = 031Eh
WM_DWMNCRENDERINGCHANGED         = 031Fh
WM_DWMCOLORIZATIONCOLORCHANGED   = 0320h
WM_DWMWINDOWMAXIMIZEDCHANGE      = 0321h
WM_GETTITLEBARINFOEX             = 033Fh
SMTO_ERRORONEXIT                 = 0020h
ENDSESSION_CRITICAL              = 40000000h
ENDSESSION_CLOSEAPP              = 00000001h
EWX_QUICKRESOLVE                 = 00000020h
EWX_RESTARTAPPS                  = 00000040h
ULW_EX_NORESIZE                  = 00000008h
MOUSEEVENTF_HWHEEL               = 01000h
MOUSEEVENTF_MOVE_NOCOALESCE      = 2000h
MAPVK_VK_TO_VSC                  = 0
MAPVK_VSC_TO_VK                  = 1
MAPVK_VK_TO_CHAR                 = 2
MAPVK_VSC_TO_VK_EX               = 3
MAPVK_VK_TO_VSC_EX               = 4
QS_RAWINPUT                      = 0400h
USER_TIMER_MAXIMUM               = 7FFFFFFFh
USER_TIMER_MINIMUM               = 0000000Ah
SM_STARTER                       = 88
SM_SERVERR2                      = 89
SM_MOUSEHORIZONTALWHEELPRESENT   = 91
SM_CXPADDEDBORDER                = 92
SM_CARETBLINKINGENABLED          = 2002h
MONITORS_MAX                     = 10
SCF_ISSECURE                     = 00000001h
DI_NOMIRROR                      = 0010h
OIC_SHIELD                       = 32518
IDI_SHIELD                       = 32518
IDTIMEOUT                        = 32000
BS_TYPEMASK                      = 0000000Fh
BM_SETDONTCLICK                  = 00F8h
SS_REALSIZECONTROL               = 00000040h
SS_EDITCONTROL                   = 00002000h
DS_USEPIXELS                     = 8000h
LB_GETLISTBOXINFO                = 01B2h
LBS_COMBOBOX                     = 8000h
CB_GETCOMBOBOXINFO               = 0164h
SBM_GETSCROLLBARINFO             = 00EBh
SPI_GETWHEELSCROLLCHARS          = 006Ch
SPI_SETWHEELSCROLLCHARS          = 006Dh
SPI_GETAUDIODESCRIPTION          = 0074h
SPI_SETAUDIODESCRIPTION          = 0075h
SPI_GETSCREENSAVESECURE          = 0076h
SPI_SETSCREENSAVESECURE          = 0077h
SPI_GETDISABLEOVERLAPPEDCONTENT  = 1040h
SPI_SETDISABLEOVERLAPPEDCONTENT  = 1041h
SPI_GETCLIENTAREAANIMATION       = 1042h
SPI_SETCLIENTAREAANIMATION       = 1043h
SPI_GETCLEARTYPE                 = 1048h
SPI_SETCLEARTYPE                 = 1049h
SPI_GETSPEECHRECOGNITION         = 104Ah
SPI_SETSPEECHRECOGNITION         = 104Bh
SPI_GETMINIMUMHITRADIUS          = 2014h
SPI_SETMINIMUMHITRADIUS          = 2015h
SPI_GETMESSAGEDURATION           = 2016h
SPI_SETMESSAGEDURATION           = 2017h
HCF_LOGONDESKTOP                 = 00000100h
HCF_DEFAULTDESKTOP               = 00000200h
CDS_ENABLE_UNSAFE_MODES          = 00000100h
CDS_DISABLE_UNSAFE_MODES         = 00000200h
EDS_ROTATEDMODE                  = 00000004h
EDD_GET_DEVICE_INTERFACE_NAME    = 00000001h
EVENT_SYSTEM_DESKTOPSWITCH       = 0020h
EVENT_OBJECT_INVOKED             = 8013h
EVENT_OBJECT_TEXTSELECTIONCHANGED = 8014h
EVENT_OBJECT_CONTENTSCROLLED     = 8015h
USER_DEFAULT_SCREEN_DPI          = 96
MOUSE_MOVE_NOCOALESCE            = 08h
RIDEV_EXINPUTSINK                = 00001000h
RIDEV_DEVNOTIFY                  = 00002000h
GIDC_ARRIVAL                     = 1
GIDC_REMOVAL                     = 2
MSGFLT_ADD                       = 1
MSGFLT_REMOVE                    = 2
MAX_STR_BLOCKREASON              = 256

;-----------------------------------[ winuser.h - Structures ]---------------------------------
CWPRETSTRUCT struct
    lResult DWORD   ?
    lParam DWORD    ?
    wParam DWORD    ?
    message DWORD   ?
    hwnd DWORD      ?
CWPRETSTRUCT ends

HARDWAREHOOKSTRUCT struct
    hwnd DWORD      ?
    message DWORD   ?
    wParam DWORD    ?
    lParam DWORD    ?
HARDWAREHOOKSTRUCT ends

USEROBJECTFLAGS struct
    fInherit DWORD  ?
    fReserved DWORD ?
    dwFlags DWORD   ?
USEROBJECTFLAGS ends

MDINEXTMENU struct
    hmenuIn DWORD   ?
    hmenuNext DWORD ?
    hwndNext DWORD  ?
MDINEXTMENU ends

NCCALCSIZE_PARAMS struct
    rgrc RECT 3 dup(<>)
    lppos DWORD     ?
NCCALCSIZE_PARAMS ends

STYLESTRUCT struct
    styleOld DWORD ?
    styleNew DWORD ?
STYLESTRUCT ends

DROPSTRUCT struct
    hwndSource DWORD    ?
    hwndSink DWORD      ?
    wFmt DWORD          ?
    dwData DWORD        ?
    ptDrop POINT        <>
    dwControlData DWORD ?
DROPSTRUCT ends

CURSORSHAPE struct
    xHotSpot DWORD  ?
    yHotSpot DWORD  ?
    regCx DWORD     ?
    regCy DWORD     ?
    cbWidth DWORD   ?
    Planes db       ?
    BitsPixel db    ?
CURSORSHAPE ends

SERIALKEYS struct
    cbSize DWORD            ?
    dwFlags DWORD           ?
    lpszActivePort DWORD    ?
    lpszPort DWORD          ?
    iBaudRate DWORD         ?
    iPortState DWORD        ?
    iActive DWORD           ?
SERIALKEYS ends

HIGHCONTRAST struct
    cbSize DWORD            ?
    dwFlags DWORD           ?
    lpszDefaultScheme DWORD ?
HIGHCONTRAST ends

FILTERKEYS struct
    cbSize DWORD        ?
    dwFlags DWORD       ?
    iWaitMSec DWORD     ?
    iDelayMSec DWORD    ?
    iRepeatMSec DWORD   ?
    iBounceMSec DWORD   ?
FILTERKEYS ends

STICKYKEYS struct
    cbSize DWORD    ?
    dwFlags DWORD   ?
STICKYKEYS ends

MOUSEKEYS struct
    cbSize DWORD            ?
    dwFlags DWORD           ?
    iMaxSpeed DWORD         ?
    iTimeToMaxSpeed DWORD   ?
    iCtrlSpeed DWORD        ?
    dwReserved1 DWORD       ?
    dwReserved2 DWORD       ?
MOUSEKEYS ends

ACCESSTIMEOUT struct
    cbSize DWORD        ?
    dwFlags DWORD       ?
    iTimeOutMSec DWORD  ?
ACCESSTIMEOUT ends

SOUNDSENTRY struct
    cbSize DWORD                    ?
    dwFlags DWORD                   ?
    iFSTextEffect DWORD             ?
    iFSTextEffectMSec DWORD         ?
    iFSTextEffectColorBits DWORD    ?
    iFSGrafEffect DWORD             ?
    iFSGrafEffectMSec DWORD         ?
    iFSGrafEffectColor DWORD        ?
    iWindowsEffect DWORD            ?
    iWindowsEffectMSec DWORD        ?
    lpszWindowsEffectDLL DWORD      ?
    iWindowsEffectOrdinal DWORD     ?
SOUNDSENTRY ends

TOGGLEKEYS struct
    cbSize DWORD ?
    dwFlags DWORD ?
TOGGLEKEYS ends

FLASHWINFO struct
  cbSize     DWORD ?
  hwnd       DWORD ?
  dwFlags    DWORD ?
  uCount     DWORD ?
  dwTimeout  DWORD ?
FLASHWINFO ends

; -------------------------
; server 2003 extra equates
; -------------------------

RT_MANIFEST                      = 24
CREATEPROCESS_MANIFEST_RESOURCE_ID = 1
ISOLATIONAWARE_MANIFEST_RESOURCE_ID = 2
ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID = 3
MINIMUM_RESERVED_MANIFEST_RESOURCE_ID = 1
MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID = 16
SW_FORCEMINIMIZE                 = 11
VK_XBUTTON1                      = 05h
VK_XBUTTON2                      = 06h
VK_SLEEP                         = 5Fh
VK_OEM_NEC_EQUAL                 = 92h
VK_OEM_FJ_JISHO                  = 92h
VK_OEM_FJ_MASSHOU                = 93h
VK_OEM_FJ_TOUROKU                = 94h
VK_OEM_FJ_LOYA                   = 95h
VK_OEM_FJ_ROYA                   = 96h
VK_BROWSER_BACK                  = 0A6h
VK_BROWSER_FORWARD               = 0A7h
VK_BROWSER_REFRESH               = 0A8h
VK_BROWSER_STOP                  = 0A9h
VK_BROWSER_SEARCH                = 0AAh
VK_BROWSER_FAVORITES             = 0ABh
VK_BROWSER_HOME                  = 0ACh
VK_VOLUME_MUTE                   = 0ADh
VK_VOLUME_DOWN                   = 0AEh
VK_VOLUME_UP                     = 0AFh
VK_MEDIA_NEXT_TRACK              = 0B0h
VK_MEDIA_PREV_TRACK              = 0B1h
VK_MEDIA_STOP                    = 0B2h
VK_MEDIA_PLAY_PAUSE              = 0B3h
VK_LAUNCH_MAIL                   = 0B4h
VK_LAUNCH_MEDIA_SELECT           = 0B5h
VK_LAUNCH_APP1                   = 0B6h
VK_LAUNCH_APP2                   = 0B7h
VK_OEM_1                         = 0BAh
VK_OEM_PLUS                      = 0BBh
VK_OEM_COMMA                     = 0BCh
VK_OEM_MINUS                     = 0BDh
VK_OEM_PERIOD                    = 0BEh
VK_OEM_2                         = 0BFh
VK_OEM_3                         = 0C0h
VK_OEM_4                         = 0DBh
VK_OEM_5                         = 0DCh
VK_OEM_6                         = 0DDh
VK_OEM_7                         = 0DEh
VK_OEM_8                         = 0DFh
VK_OEM_AX                        = 0E1h
VK_OEM_102                       = 0E2h
VK_ICO_HELP                      = 0E3h
VK_ICO_00                        = 0E4h
VK_ICO_CLEAR                     = 0E6h
VK_PACKET                        = 0E7h
VK_OEM_RESET                     = 0E9h
VK_OEM_JUMP                      = 0EAh
VK_OEM_PA1                       = 0EBh
VK_OEM_PA2                       = 0ECh
VK_OEM_PA3                       = 0EDh
VK_OEM_WSCTRL                    = 0EEh
VK_OEM_CUSEL                     = 0EFh
VK_OEM_ATTN                      = 0F0h
VK_OEM_FINISH                    = 0F1h
VK_OEM_COPY                      = 0F2h
VK_OEM_AUTO                      = 0F3h
VK_OEM_ENLW                      = 0F4h
VK_OEM_BACKTAB                   = 0F5h
WTS_CONSOLE_CONNECT              = 1h
WTS_CONSOLE_DISCONNECT           = 2h
WTS_REMOTE_CONNECT               = 3h
WTS_REMOTE_DISCONNECT            = 4h
WTS_SESSION_LOGON                = 5h
WTS_SESSION_LOGOFF               = 6h
WTS_SESSION_LOCK                 = 7h
WTS_SESSION_UNLOCK               = 8h
WTS_SESSION_REMOTE_CONTROL       = 9h
HSHELL_SYSMENU                   = 9
HSHELL_ENDTASK                   = 10
HSHELL_APPCOMMAND                = 12
HSHELL_WINDOWREPLACED            = 13
HSHELL_WINDOWREPLACING           = 14
HSHELL_HIGHBIT                   = 8000h
HSHELL_FLASH                     = (HSHELL_REDRAW or HSHELL_HIGHBIT)
HSHELL_RUDEAPPACTIVATED          = (HSHELL_WINDOWACTIVATED or HSHELL_HIGHBIT)
APPCOMMAND_BROWSER_BACKWARD      = 1
APPCOMMAND_BROWSER_FORWARD       = 2
APPCOMMAND_BROWSER_REFRESH       = 3
APPCOMMAND_BROWSER_STOP          = 4
APPCOMMAND_BROWSER_SEARCH        = 5
APPCOMMAND_BROWSER_FAVORITES     = 6
APPCOMMAND_BROWSER_HOME          = 7
APPCOMMAND_VOLUME_MUTE           = 8
APPCOMMAND_VOLUME_DOWN           = 9
APPCOMMAND_VOLUME_UP             = 10
APPCOMMAND_MEDIA_NEXTTRACK       = 11
APPCOMMAND_MEDIA_PREVIOUSTRACK   = 12
APPCOMMAND_MEDIA_STOP            = 13
APPCOMMAND_MEDIA_PLAY_PAUSE      = 14
APPCOMMAND_LAUNCH_MAIL           = 15
APPCOMMAND_LAUNCH_MEDIA_SELECT   = 16
APPCOMMAND_LAUNCH_APP1           = 17
APPCOMMAND_LAUNCH_APP2           = 18
APPCOMMAND_BASS_DOWN             = 19
APPCOMMAND_BASS_BOOST            = 20
APPCOMMAND_BASS_UP               = 21
APPCOMMAND_TREBLE_DOWN           = 22
APPCOMMAND_TREBLE_UP             = 23
APPCOMMAND_MICROPHONE_VOLUME_MUTE = 24
APPCOMMAND_MICROPHONE_VOLUME_DOWN = 25
APPCOMMAND_MICROPHONE_VOLUME_UP  = 26
APPCOMMAND_HELP                  = 27
APPCOMMAND_FIND                  = 28
APPCOMMAND_NEW                   = 29
APPCOMMAND_OPEN                  = 30
APPCOMMAND_CLOSE                 = 31
APPCOMMAND_SAVE                  = 32
APPCOMMAND_PRINT                 = 33
APPCOMMAND_UNDO                  = 34
APPCOMMAND_REDO                  = 35
APPCOMMAND_COPY                  = 36
APPCOMMAND_CUT                   = 37
APPCOMMAND_PASTE                 = 38
APPCOMMAND_REPLY_TO_MAIL         = 39
APPCOMMAND_FORWARD_MAIL          = 40
APPCOMMAND_SEND_MAIL             = 41
APPCOMMAND_SPELL_CHECK           = 42
APPCOMMAND_DICTATE_OR_COMMAND_CONTROL_TOGGLE = 43
APPCOMMAND_MIC_ON_OFF_TOGGLE     = 44
APPCOMMAND_CORRECTION_LIST       = 45
APPCOMMAND_MEDIA_PLAY            = 46
APPCOMMAND_MEDIA_PAUSE           = 47
APPCOMMAND_MEDIA_RECORD          = 48
APPCOMMAND_MEDIA_FAST_FORWARD    = 49
APPCOMMAND_MEDIA_REWIND          = 50
APPCOMMAND_MEDIA_CHANNEL_UP      = 51
APPCOMMAND_MEDIA_CHANNEL_DOWN    = 52
FAPPCOMMAND_MOUSE                = 8000h
FAPPCOMMAND_KEY                  = 0
FAPPCOMMAND_OEM                  = 1000h
FAPPCOMMAND_MASK                 = 0F000h
KLF_SHIFTLOCK                    = 00010000h
KLF_RESET                        = 40000000h
INPUTLANGCHANGE_SYSCHARSET       = 0001h
INPUTLANGCHANGE_FORWARD          = 0002h
INPUTLANGCHANGE_BACKWARD         = 0004h
GMMP_USE_HIGH_RESOLUTION_POINTS  = 2
CWF_CREATE_ONLY                  = 0001h
GWLP_WNDPROC                     = (-4)
GWLP_HINSTANCE                   = (-6)
GWLP_HWNDPARENT                  = (-8)
GWLP_USERDATA                    = (-21)
GWLP_ID                          = (-12)
GCLP_MENUNAME                    = (-8)
GCLP_HBRBACKGROUND               = (-10)
GCLP_HCURSOR                     = (-12)
GCLP_HICON                       = (-14)
GCLP_HMODULE                     = (-16)
GCLP_WNDPROC                     = (-24)
GCLP_HICONSM                     = (-34)
WM_NCXBUTTONDOWN                 = 00ABh
WM_NCXBUTTONUP                   = 00ACh
WM_NCXBUTTONDBLCLK               = 00ADh
WM_UNICHAR                       = 0109h
UNICODE_NOCHAR                   = 0FFFFh
WM_CHANGEUISTATE                 = 0127h
WM_UPDATEUISTATE                 = 0128h
WM_QUERYUISTATE                  = 0129h
UIS_SET                          = 1
UIS_CLEAR                        = 2
UIS_INITIALIZE                   = 3
UISF_HIDEFOCUS                   = 1h
UISF_HIDEACCEL                   = 2h
UISF_ACTIVE                      = 4h
MN_GETHMENU                      = 01E1h
WM_XBUTTONDOWN                   = 020Bh
WM_XBUTTONUP                     = 020Ch
WM_XBUTTONDBLCLK                 = 020Dh
WM_NCMOUSEHOVER                  = 02A0h
WM_NCMOUSELEAVE                  = 02A2h
WM_WTSSESSION_CHANGE             = 02B1h
WM_TABLET_FIRST                  = 02c0h
WM_TABLET_LAST                   = 02dfh
WM_APPCOMMAND                    = 0319h
WM_THEMECHANGED                  = 031Ah
ICON_SMALL2                      = 2
MK_XBUTTON1                      = 0020h
MK_XBUTTON2                      = 0040h
WS_EX_LAYERED                    = 00080000h
WS_EX_NOINHERITLAYOUT            = 00100000h
WS_EX_LAYOUTRTL                  = 00400000h
WS_EX_COMPOSITED                 = 02000000h
WS_EX_NOACTIVATE                 = 08000000h
CS_DROPSHADOW                    = 00020000h
DC_BUTTONS                       = 1000h
CF_DIBV5                         = 17
WPF_ASYNCWINDOWPLACEMENT         = 0004h
ODS_NOACCEL                      = 0100h
ODS_NOFOCUSRECT                  = 0200h
BSF_ALLOWSFW                     = 00000080h
BSF_SENDNOTIFYMESSAGE            = 00000100h
BSF_RETURNHDESK                  = 00000200h
BSF_LUID                         = 00000400h
DEVICE_NOTIFY_SERVICE_HANDLE     = 00000001h
DEVICE_NOTIFY_ALL_INTERFACE_CLASSES = 00000004h
PW_CLIENTONLY                    = 00000001h
LWA_COLORKEY                     = 00000001h
LWA_ALPHA                        = 00000002h
ULW_COLORKEY                     = 00000001h
ULW_ALPHA                        = 00000002h
ULW_OPAQUE                       = 00000004h
SM_IMMENABLED                    = 82
SM_CXFOCUSBORDER                 = 83
SM_CYFOCUSBORDER                 = 84
SM_TABLETPC                      = 86
SM_MEDIACENTER                   = 87
SM_REMOTESESSION                 = 1000h
SM_SHUTTINGDOWN                  = 2000h
SM_REMOTECONTROL                 = 2001h
PMB_ACTIVE                       = 00000001h
MNGOF_TOPGAP                     = 00000001h
MNGOF_BOTTOMGAP                  = 00000002h
TPM_HORPOSANIMATION              = 0400h
TPM_HORNEGANIMATION              = 0800h
TPM_VERPOSANIMATION              = 1000h
TPM_VERNEGANIMATION              = 2000h
TPM_NOANIMATION                  = 4000h
TPM_LAYOUTRTL                    = 8000h
DT_NOFULLWIDTHCHARBREAK          = 00080000h
DT_HIDEPREFIX                    = 00100000h
DT_PREFIXONLY                    = 00200000h
DSS_HIDEPREFIX                   = 0200h
DSS_PREFIXONLY                   = 0400h
ASFW_ANY                         = (-1)
LSFW_LOCK                        = 1
LSFW_UNLOCK                      = 2
MB_CANCELTRYCONTINUE             = 00000006h
MB_SERVICE_NOTIFICATION_NT3X     = 00040000h
COLOR_MENUHILIGHT                = 29
COLOR_MENUBAR                    = 30
SPI_GETSNAPTODEFBUTTON           = 005Fh
SPI_SETSNAPTODEFBUTTON           = 0060h
SPI_GETMENUSHOWDELAY             = 006Ah
SPI_SETMENUSHOWDELAY             = 006Bh
SPI_GETDESKWALLPAPER             = 0073h
SPI_GETKEYBOARDCUES              = 100Ah
SPI_SETKEYBOARDCUES              = 100Bh
SPI_GETMENUFADE                  = 1012h
SPI_SETMENUFADE                  = 1013h
SPI_GETSELECTIONFADE             = 1014h
SPI_SETSELECTIONFADE             = 1015h
SPI_GETTOOLTIPANIMATION          = 1016h
SPI_SETTOOLTIPANIMATION          = 1017h
SPI_GETTOOLTIPFADE               = 1018h
SPI_SETTOOLTIPFADE               = 1019h
SPI_GETCURSORSHADOW              = 101Ah
SPI_SETCURSORSHADOW              = 101Bh
SPI_GETMOUSESONAR                = 101Ch
SPI_SETMOUSESONAR                = 101Dh
SPI_GETMOUSECLICKLOCK            = 101Eh
SPI_SETMOUSECLICKLOCK            = 101Fh
SPI_GETMOUSEVANISH               = 1020h
SPI_SETMOUSEVANISH               = 1021h
SPI_GETFLATMENU                  = 1022h
SPI_SETFLATMENU                  = 1023h
SPI_GETDROPSHADOW                = 1024h
SPI_SETDROPSHADOW                = 1025h
SPI_GETBLOCKSENDINPUTRESETS      = 1026h
SPI_SETBLOCKSENDINPUTRESETS      = 1027h
SPI_GETUIEFFECTS                 = 103Eh
SPI_SETUIEFFECTS                 = 103Fh
SPI_GETCARETWIDTH                = 2006h
SPI_SETCARETWIDTH                = 2007h
SPI_GETMOUSECLICKLOCKTIME        = 2008h
SPI_SETMOUSECLICKLOCKTIME        = 2009h
SPI_GETFONTSMOOTHINGTYPE         = 200Ah
SPI_SETFONTSMOOTHINGTYPE         = 200Bh
FE_FONTSMOOTHINGSTANDARD         = 0001h
FE_FONTSMOOTHINGCLEARTYPE        = 0002h
FE_FONTSMOOTHINGDOCKING          = 8000h
SPI_GETFONTSMOOTHINGCONTRAST     = 200Ch
SPI_SETFONTSMOOTHINGCONTRAST     = 200Dh
SPI_GETFOCUSBORDERWIDTH          = 200Eh
SPI_SETFOCUSBORDERWIDTH          = 200Fh
SPI_GETFOCUSBORDERHEIGHT         = 2010h
SPI_SETFOCUSBORDERHEIGHT         = 2011h
SPI_GETFONTSMOOTHINGORIENTATION  = 2012h
SPI_SETFONTSMOOTHINGORIENTATION  = 2013h
FE_FONTSMOOTHINGORIENTATIONBGR   = 0000h
FE_FONTSMOOTHINGORIENTATIONRGB   = 0001h
CDS_VIDEOPARAMETERS              = 00000020h
DISP_CHANGE_BADDUALVIEW          = -6
EDS_RAWMODE                      = 00000002h
OBJID_QUERYCLASSNAMEIDX          = (0FFFFFFF4h)
OBJID_NATIVEOM                   = (0FFFFFFF0h)
EVENT_CONSOLE_CARET              = 4001h
EVENT_CONSOLE_UPDATE_REGION      = 4002h
EVENT_CONSOLE_UPDATE_SIMPLE      = 4003h
EVENT_CONSOLE_UPDATE_SCROLL      = 4004h
EVENT_CONSOLE_LAYOUT             = 4005h
EVENT_CONSOLE_START_APPLICATION  = 4006h
EVENT_CONSOLE_END_APPLICATION    = 4007h
CONSOLE_APPLICATION_16BIT        = 0001h
CONSOLE_CARET_SELECTION          = 0001h
CONSOLE_CARET_VISIBLE            = 0002h
GUI_16BITTASK                    = 00000020h
STATE_SYSTEM_INDETERMINATE       = STATE_SYSTEM_MIXED
STATE_SYSTEM_PROTECTED           = 20000000h
RIM_INPUT                        = 0
RIM_INPUTSINK                    = 1
RIM_TYPEMOUSE                    = 0
RIM_TYPEKEYBOARD                 = 1
RIM_TYPEHID                      = 2
RI_MOUSE_LEFT_BUTTON_DOWN        = 0001h
RI_MOUSE_LEFT_BUTTON_UP          = 0002h
RI_MOUSE_RIGHT_BUTTON_DOWN       = 0004h
RI_MOUSE_RIGHT_BUTTON_UP         = 0008h
RI_MOUSE_MIDDLE_BUTTON_DOWN      = 0010h
RI_MOUSE_MIDDLE_BUTTON_UP        = 0020h
RI_MOUSE_BUTTON_1_DOWN           = RI_MOUSE_LEFT_BUTTON_DOWN
RI_MOUSE_BUTTON_1_UP             = RI_MOUSE_LEFT_BUTTON_UP
RI_MOUSE_BUTTON_2_DOWN           = RI_MOUSE_RIGHT_BUTTON_DOWN
RI_MOUSE_BUTTON_2_UP             = RI_MOUSE_RIGHT_BUTTON_UP
RI_MOUSE_BUTTON_3_DOWN           = RI_MOUSE_MIDDLE_BUTTON_DOWN
RI_MOUSE_BUTTON_3_UP             = RI_MOUSE_MIDDLE_BUTTON_UP
RI_MOUSE_BUTTON_4_DOWN           = 0040h
RI_MOUSE_BUTTON_4_UP             = 0080h
RI_MOUSE_BUTTON_5_DOWN           = 0100h
RI_MOUSE_BUTTON_5_UP             = 0200h
RI_MOUSE_WHEEL                   = 0400h
MOUSE_MOVE_RELATIVE              = 0
MOUSE_MOVE_ABSOLUTE              = 1
MOUSE_VIRTUAL_DESKTOP            = 02h
MOUSE_ATTRIBUTES_CHANGED         = 04h
KEYBOARD_OVERRUN_MAKE_CODE       = 0FFh
RI_KEY_MAKE                      = 0
RI_KEY_BREAK                     = 1
RI_KEY_E0                        = 2
RI_KEY_E1                        = 4
RI_KEY_TERMSRV_SET_LED           = 8
RI_KEY_TERMSRV_SHADOW            = 10h
RID_INPUT                        = 10000003h
RID_HEADER                       = 10000005h
RIDI_PREPARSEDDATA               = 20000005h
RIDI_DEVICENAME                  = 20000007h
RIDI_DEVICEINFO                  = 2000000bh
RIDEV_REMOVE                     = 00000001h
RIDEV_EXCLUDE                    = 00000010h
RIDEV_PAGEONLY                   = 00000020h
RIDEV_NOLEGACY                   = 00000030h
RIDEV_INPUTSINK                  = 00000100h
RIDEV_CAPTUREMOUSE               = 00000200h
RIDEV_NOHOTKEYS                  = 00000200h
RIDEV_APPKEYS                    = 00000400h
RIDEV_EXMODEMASK                 = 000000F0h

INVALID_SET_FILE_POINTER         = -1
INVALID_FILE_SIZE                = -1
MOUSEEVENTF_VIRTUALDESK          = 4000h
IDTRYAGAIN                       = 10
IDCONTINUE                       = 11
EN_ALIGN_LTR_EC                  = 0700h
EN_ALIGN_RTL_EC                  = 0701h
DWLP_MSGRESULT                   = 0
DS_SHELLFONT                     = DS_SETFONT or DS_FIXEDSYS
LB_MULTIPLEADDSTRING             = 01B1h
CB_MULTIPLEADDSTRING             = 0163h
MDITILE_ZORDER                   = 0004h

PM_QS_INPUT                      = (QS_INPUT SHL 16)
PM_QS_POSTMESSAGE                = (QS_POSTMESSAGE or QS_HOTKEY or QS_TIMER  SHL 16)
PM_QS_PAINT                      = (QS_PAINT SHL 16)
PM_QS_SENDMESSAGE                = (QS_SENDMESSAGE SHL 16)

; winspool equates

OSVERSION_MASK                   = 0FFFF0000h
SPVERSION_MASK                   = 0000FF00h
SUBVERSION_MASK                  = 000000FFh
PRINTER_STATUS_SERVER_OFFLINE    = 02000000h
PRINTER_STATUS_DRIVER_UPDATE_NEEDED = 04000000h
PRINTER_ATTRIBUTE_PUSHED_USER    = 00020000h
PRINTER_ATTRIBUTE_PUSHED_MACHINE = 00040000h
PRINTER_ATTRIBUTE_MACHINE        = 00080000h
PRINTER_ATTRIBUTE_FRIENDLY_NAME  = 00100000h
JOB_CONTROL_RETAIN               = 8
JOB_CONTROL_RELEASE              = 9
JOB_STATUS_RETAINED              = 00002000h
JOB_STATUS_RENDERING_LOCALLY     = 00004000h
PRINTER_DRIVER_PACKAGE_AWARE     = 00000001h
STRING_NONE                      = 00000001h
STRING_MUIDLL                    = 00000002h
STRING_LANGPAIR                  = 00000004h
MAX_FORM_KEYWORD_LENGTH          = 63+1
PPCAPS_RIGHT_THEN_DOWN           = 00000001h
PPCAPS_BORDER_PRINT              = 00000001h
PPCAPS_BOOKLET_EDGE              = 00000001h
PPCAPS_REVERSE_PAGES_FOR_REVERSE_DUPLEX = 00000001h
PPCAPS_SQUARE_SCALING            = 00000001h
PRINTER_NOTIFY_FIELD_FRIENDLY_NAME = 1Bh
JOB_NOTIFY_FIELD_REMOTE_JOB_ID   = 18h
JOB_ACCESS_READ                  = 00000020h
PRINTER_CONNECTION_MISMATCH      = 00000020h
PRINTER_CONNECTION_NO_UI         = 00000040h
IPDFP_COPY_ALL_FILES             = 00000001h
UPDP_SILENT_UPLOAD               = 00000001h
UPDP_UPLOAD_ALWAYS               = 00000002h
UPDP_CHECK_DRIVERSTORE           = 00000004h



;;;; end winuser

;;;; comdlg

; *************** equates and structures from commdlg.h *******************

CDERR_GENERALCODES      = 0000h
CDERR_STRUCTSIZE        = 0001h
CDERR_INITIALIZATION    = 0002h
CDERR_NOTEMPLATE        = 0003h
CDERR_NOHINSTANCE       = 0004h
CDERR_LOADSTRFAILURE    = 0005h
CDERR_FINDRESFAILURE    = 0006h
CDERR_LOADRESFAILURE    = 0007h
CDERR_LOCKRESFAILURE    = 0008h
CDERR_MEMALLOCFAILURE   = 0009h
CDERR_MEMLOCKFAILURE    = 000Ah
CDERR_NOHOOK            = 000Bh
CDERR_REGISTERMSGFAIL   = 000Ch
CC_RGBINIT              = 00000001h
CC_FULLOPEN             = 00000002h
CC_PREVENTFULLOPEN      = 00000004h
CC_SHOWHELP             = 00000008h
CC_ENABLEHOOK           = 00000010h
CC_ENABLETEMPLATE       = 00000020h
CC_ENABLETEMPLATEHANDLE = 00000040h
CCERR_CHOOSECOLORCODES  = 5000h
FR_DOWN                 = 00000001h
FR_WHOLEWORD            = 00000002h
FR_MATCHCASE            = 00000004h
FR_FINDNEXT             = 00000008h
FR_REPLACE              = 00000010h
FR_REPLACEALL           = 00000020h
FR_DIALOGTERM           = 00000040h
FR_SHOWHELP             = 00000080h
FR_ENABLEHOOK           = 00000100h
FR_ENABLETEMPLATE       = 00000200h
FR_NOUPDOWN             = 00000400h
FR_NOMATCHCASE          = 00000800h
FR_NOWHOLEWORD          = 00001000h
FR_ENABLETEMPLATEHANDLE = 00002000h
FR_HIDEUPDOWN           = 00004000h
FR_HIDEMATCHCASE        = 00008000h
FR_HIDEWHOLEWORD        = 00010000h
FRERR_FINDREPLACECODES  = 4000h
FRERR_BUFFERLENGTHZERO  = 4001h
CF_SCREENFONTS          = 00000001h
CF_PRINTERFONTS         = 00000002h
CF_BOTH                 = CF_SCREENFONTS + CF_PRINTERFONTS
CF_SHOWHELP             = 00000004h
CF_ENABLEHOOK           = 00000008h
CF_ENABLETEMPLATE       = 00000010h
CF_ENABLETEMPLATEHANDLE = 00000020h
CF_INITTOLOGFONTSTRUCT  = 00000040h
CF_USESTYLE             = 00000080h
CF_EFFECTS              = 00000100h
CF_APPLY                = 00000200h
CF_ANSIONLY             = 00000400h
CF_NOVECTORFONTS        = 00000800h
CF_NOOEMFONTS           = CF_NOVECTORFONTS
CF_NOSIMULATIONS        = 00001000h
CF_LIMITSIZE            = 00002000h
CF_FIXEDPITCHONLY       = 00004000h
CF_WYSIWYG              = 00008000h
CF_FORCEFONTEXIST       = 00010000h
CF_SCALABLEONLY         = 00020000h
CF_TTONLY               = 00040000h
CF_NOFACESEL            = 00080000h
CF_NOSTYLESEL           = 00100000h
CF_NOSIZESEL            = 00200000h
CFERR_CHOOSEFONTCODES   = 2000h
CFERR_NOFONTS           = 2001h
CFERR_MAXLESSTHANMIN    = 2002h
WM_CHOOSEFONT_GETLOGFONT = WM_USER + 1
CD_LBSELNOITEMS         = -1
CD_LBSELCHANGE          =  0
CD_LBSELSUB             =  1
CD_LBSELADD             =  2
PD_ALLPAGES             = 00000000h
PD_SELECTION            = 00000001h
PD_PAGENUMS             = 00000002h
PD_NOSELECTION          = 00000004h
PD_NOPAGENUMS           = 00000008h
PD_COLLATE              = 00000010h
PD_PRINTTOFILE          = 00000020h
PD_PRINTSETUP           = 00000040h
PD_NOWARNING            = 00000080h
PD_RETURNDC             = 00000100h
PD_RETURNIC             = 00000200h
PD_RETURNDEFAULT        = 00000400h
PD_SHOWHELP             = 00000800h
PD_ENABLEPRINTHOOK      = 00001000h
PD_ENABLESETUPHOOK      = 00002000h
PD_ENABLEPRINTTEMPLATE  = 00004000h
PD_ENABLESETUPTEMPLATE  = 00008000h
PD_ENABLEPRINTTEMPLATEHANDLE            = 00010000h
PD_ENABLESETUPTEMPLATEHANDLE            = 00020000h
PD_USEDEVMODECOPIES     = 00040000h
PD_DISABLEPRINTTOFILE   = 00080000h
PD_HIDEPRINTTOFILE      = 00100000h
PDERR_PRINTERCODES      = 1000h
PDERR_SETUPFAILURE      = 1001h
PDERR_PARSEFAILURE      = 1002h
PDERR_RETDEFFAILURE     = 1003h
PDERR_LOADDRVFAILURE    = 1004h
PDERR_GETDEVMODEFAIL    = 1005h
PDERR_INITFAILURE       = 1006h
PDERR_NODEVICES         = 1007h
PDERR_NODEFAULTPRN      = 1008h
PDERR_DNDMMISMATCH      = 1009h
PDERR_CREATEICFAILURE   = 100Ah
PDERR_PRINTERNOTFOUND   = 100Bh
PDERR_DEFAULTDIFFERENT  = 100Ch
DN_DEFAULTPRN           = 0001h
OFN_ALLOWMULTISELECT    = 00000200h
OFN_CREATEPROMPT        = 00002000h
OFN_ENABLEHOOK          = 00000020h
OFN_ENABLETEMPLATE      = 00000040h
OFN_ENABLETEMPLATEHANDLE                = 00000080h
OFN_EXPLORER            = 00080000h
OFN_EXTENSIONDIFFERENT  = 00000400h
OFN_FILEMUSTEXIST       = 00001000h
OFN_HIDEREADONLY        = 00000004h
OFN_LONGNAMES           = 00200000h
OFN_NOCHANGEDIR         = 00000008h
OFN_NODEREFERENCELINKS  = 00100000h
OFN_NOLONGNAMES         = 00040000h
OFN_NONETWORKBUTTON     = 00020000h
OFN_NOREADONLYRETURN    = 00008000h
OFN_NOTESTFILECREATE    = 00010000h
OFN_NOVALIDATE          = 00000100h
OFN_OVERWRITEPROMPT     = 00000002h
OFN_PATHMUSTEXIST       = 00000800h
OFN_READONLY            = 00000001h
OFN_SHAREAWARE          = 00004000h
OFN_SHOWHELP            = 00000010h
OFN_SHAREFALLTHROUGH    = 2
OFN_SHARENOWARN         = 1
OFN_SHAREWARN           = 0
CDERR_DIALOGFAILURE     = 0FFFFh
FNERR_FILENAMECODES     = 3000h
FNERR_SUBCLASSFAILURE   = 3001h
FNERR_INVALIDFILENAME   = 3002h
FNERR_BUFFERTOOSMALL    = 3003h

CHOOSECOLOR struct
  lStructSize     DWORD      ?
  hwndOwner       DWORD      ?
  hInstance       DWORD      ?
  rgbResult       DWORD      ?
  lpCustColors    DWORD      ?
  Flags           DWORD      ?
  lCustData       DWORD      ?
  lpfnHook        DWORD      ?
  lpTemplateName  DWORD      ?
CHOOSECOLOR ends

FINDREPLACE struct
  lStructSize       DWORD      ?
  hwndOwner         DWORD      ?
  hInstance         DWORD      ?
  Flags             DWORD      ?
  lpstrFindWhat     DWORD      ?
  lpstrReplaceWith  DWORD      ?
  wFindWhatLen       WORD      ?
  wReplaceWithLen    WORD      ?
  lCustData         DWORD      ?
  lpfnHook          DWORD      ?
  lpTemplateName    DWORD      ?
FINDREPLACE ends

CHOOSEFONT struct
  lStructSize     DWORD      ?
  hwndOwner       DWORD      ?
  hDC             DWORD      ?
  lpLogFont       DWORD      ?
  iPointSize      DWORD      ?
  Flags           DWORD      ?
  rgbColors       DWORD      ?
  lCustData       DWORD      ?
  lpfnHook        DWORD      ?
  lpTemplateName  DWORD      ?
  hInstance       DWORD      ?
  lpszStyle       DWORD      ?
  nFontType        WORD      ?
  Alignment        WORD      ?
  nSizeMin        DWORD      ?
  nSizeMax        DWORD      ?
CHOOSEFONT ends

DEVNAMES struct
  wDriverOffset  WORD      ?
  wDeviceOffset  WORD      ?
  wOutputOffset  WORD      ?
  wDefault       WORD      ?
DEVNAMES ends

PRINTDLG struct
  lStructSize               DWORD      ?
  hwndOwner                 DWORD      ?
  hDevMode                  DWORD      ?
  hDevNames                 DWORD      ?
  hDC                       DWORD      ?
  Flags                     DWORD      ?
  nFromPage                  WORD      ?
  nToPage                    WORD      ?
  nMinPage                   WORD      ?
  nMaxPage                   WORD      ?
  nCopies                    WORD      ?
  hInstance                 DWORD      ?
  lCustData                 DWORD      ?
  lpfnPrintHook             DWORD      ?
  lpfnSetupHook             DWORD      ?
  lpPrintTemplateName       DWORD      ?
  lpPrintSetupTemplateName  DWORD      ?
  hPrintTemplate            DWORD      ?
  hSetupTemplate            DWORD      ?
PRINTDLG ends

OPENFILENAME struct
  lStructSize        DWORD      ?
  hwndOwner          DWORD      ?
  hInstance          DWORD      ?
  lpstrFilter        DWORD      ?
  lpstrCustomFilter  DWORD      ?
  nMaxCustFilter     DWORD      ?
  nFilterIndex       DWORD      ?
  lpstrFile          DWORD      ?
  nMaxFile           DWORD      ?
  lpstrFileTitle     DWORD      ?
  nMaxFileTitle      DWORD      ?
  lpstrInitialDir    DWORD      ?
  lpstrTitle         DWORD      ?
  Flags              DWORD      ?
  nFileOffset         WORD      ?
  nFileExtension      WORD      ?
  lpstrDefExt        DWORD      ?
  lCustData          DWORD      ?
  lpfnHook           DWORD      ?
  lpTemplateName     DWORD      ?
OPENFILENAME ends

SES_EMULATESYSEDIT          = 1
SES_BEEPONMAXTEXT           = 2
SES_EXTENDBACKCOLOR         = 4
SES_MAPCPS                  = 8
SES_EMULATE10               = 16
SES_USECRLF                 = 32
SES_USEAIMM                 = 64
SES_ALLOWBEEPS              = 256

ENM_NONE                    = 00000000h
ENM_CHANGE                  = 00000001h
ENM_UPDATE                  = 00000002h
ENM_SCROLL                  = 00000004h
ENM_KEYEVENTS               = 00010000h
ENM_MOUSEEVENTS             = 00020000h
ENM_REQUESTRESIZE           = 00040000h
ENM_SELCHANGE               = 00080000h
ENM_DROPFILES               = 00100000h
ENM_PROTECTED               = 00200000h
ENM_CORRECTTEXT             = 00400000h
ENM_IMECHANGE               = 00800000h
ES_SAVESEL                  = 00008000h
ES_SUNKEN                   = 00004000h
ES_DISABLENOSCROLL          = 00002000h
ES_SELECTIONBAR             = 01000000h
ES_EX_NOCALLOLEINIT         = 01000000h
ES_VERTICAL                 = 00400000h
ES_NOIME                    = 00080000h
ES_SELFIME                  = 00040000h
ECO_AUTOWORDSELECTION       = 00000001h
ECO_AUTOVSCROLL             = 00000040h
ECO_AUTOHSCROLL             = 00000080h
ECO_NOHIDESEL               = 00000100h
ECO_READONLY                = 00000800h
ECO_WANTRETURN              = 00001000h
ECO_SAVESEL                 = 00008000h
ECO_SELECTIONBAR            = 01000000h
ECO_VERTICAL                = 00400000h
ECOOP_SET                   = 0001h
ECOOP_OR                    = 0002h
ECOOP_AND                   = 0003h
ECOOP_XOR                   = 0004h
WB_CLASSIFY                 = 3
WB_MOVEWORDLEFT             = 4
WB_MOVEWORDRIGHT            = 5
WB_LEFTBREAK                = 6
WB_RIGHTBREAK               = 7
WB_MOVEWORDPREV             = 4
WB_MOVEWORDNEXT             = 5
WB_PREVBREAK                = 6
WB_NEXTBREAK                = 7
PC_FOLLOWING                = 1
PC_LEADING                  = 2
PC_OVERFLOW                 = 3
PC_DELIMITER                = 4
WBF_WORDWRAP                = 010h
WBF_WORDBREAK               = 020h
WBF_OVERFLOW                = 040h
WBF_LEVEL1                  = 080h
WBF_LEVEL2                  = 100h
WBF_CUSTOM                  = 200h

IMF_FORCENONE                  = 0001h
IMF_FORCEENABLE                = 0002h
IMF_FORCEDISABLE               = 0004h
IMF_CLOSESTATUSWINDOW          = 0008h
IMF_VERTICAL   = 0020h
IMF_FORCEACTIVE                = 0040h
IMF_FORCEINACTIVE              = 0080h
IMF_FORCEREMEMBER              = 0100h
WBF_CLASS               = 0Fh
WBF_ISWHITE             = 10h
WBF_BREAKLINE           = 20h
WBF_BREAKAFTER          = 40h
CFM_BOLD               = 00000001h
CFM_ITALIC             = 00000002h
CFM_UNDERLINE          = 00000004h
CFM_STRIKEOUT          = 00000008h
CFM_PROTECTED          = 00000010h
CFM_SIZE               = 80000000h
CFM_COLOR              = 40000000h
CFM_FACE               = 20000000h
CFM_OFFSET             = 10000000h
CFM_CHARSET            = 08000000h
CFE_BOLD               = 0001h
CFE_ITALIC             = 0002h
CFE_UNDERLINE          = 0004h
CFE_STRIKEOUT          = 0008h
CFE_PROTECTED          = 0010h
CFE_AUTOCOLOR          = 40000000h
yHeightCharPtsMost     = 1638
SCF_SELECTION          = 0001h
SCF_WORD               = 0002h
SF_TEXT                = 0001h
SF_RTF                 = 0002h
SF_RTFNOOBJS           = 0003h
SF_TEXTIZED            = 0004h
SFF_SELECTION          = 8000h
SFF_PLAINRTF           = 4000h
MAX_TAB_STOPS          = 32
lDefaultTab            = 720
PFM_STARTINDENT             = 00000001h
PFM_RIGHTINDENT             = 00000002h
PFM_OFFSET  = 00000004h
PFM_ALIGNMENT               = 00000008h
PFM_TABSTOPS                = 00000010h
PFM_NUMBERING               = 00000020h
PFM_OFFSETINDENT            = 80000000h
PFN_BULLET  = 0001h
PFA_LEFT    = 0001h
PFA_RIGHT   = 0002h
PFA_CENTER  = 0003h
SEL_EMPTY                = 0000h
SEL_TEXT = 0001h
SEL_OBJECT               = 0002h
SEL_MULTICHAR            = 0004h
SEL_MULTIOBJECT          = 0008h
OLEOP_DOVERB           = 1

OFN_ENABLEINCLUDENOTIFY          = 00400000h
OFN_ENABLESIZING                 = 00800000h
OFN_DONTADDTORECENT              = 02000000h
OFN_FORCESHOWHIDDEN              = 10000000h
OFN_EX_NOPLACESBAR               = 00000001h
CDN_INITDONE                     = 0000h
CDN_SELCHANGE                    = 0001h
CDN_FOLDERCHANGE                 = 0002h
CDN_SHAREVIOLATION               = 0003h
CDN_HELP                         = 0004h
CDN_FILEOK                       = 0005h
CDN_TYPECHANGE                   = 0006h
CDN_INCLUDEITEM                  = 0007h
CC_SOLIDCOLOR                    = 00000080h
FR_RAW                           = 00020000h
CF_SELECTSCRIPT                  = 00400000h
CF_NOSCRIPTSEL                   = 00800000h
CF_NOVERTFONTS                   = 01000000h
PS_OPENTYPE_FONTTYPE             = 10000h
TT_OPENTYPE_FONTTYPE             = 20000h
TYPE1_FONTTYPE                   = 40000h
WM_CHOOSEFONT_SETLOGFONT         = (WM_USER + 101)
WM_CHOOSEFONT_SETFLAGS           = (WM_USER + 102)
PD_USEDEVMODECOPIESANDCOLLATE    = 00040000h
PD_NONETWORKBUTTON               = 00200000h
PD_CURRENTPAGE                   = 00400000h
PD_NOCURRENTPAGE                 = 00800000h
PD_EXCLUSIONFLAGS                = 01000000h
PD_USELARGETEMPLATE              = 10000000h
PD_EXCL_COPIESANDCOLLATE         = (DM_COPIES or DM_COLLATE)
START_PAGE_GENERAL               = 0FFFFFFFFh
PD_RESULT_CANCEL                 = 0
PD_RESULT_PRINT                  = 1
PD_RESULT_APPLY                  = 2
PSD_NONETWORKBUTTON              = 00200000h
ISOLATION_AWARE_USE_STATIC_LIBRARY = 0
ISOLATION_AWARE_BUILD_STATIC_LIBRARY = 0




;;;; end comdlg

;;;; comctl

; --------------------------- comctl equates -------------------------------

ODT_HEADER          = 100
ODT_TAB             = 101
ODT_LISTVIEW        = 102
LVM_FIRST           = 1000h
TV_FIRST            = 1100h
HDM_FIRST           = 1200h
NM_OUTOFMEMORY      = NM_FIRST-1
NM_CLICK            = NM_FIRST-2
NM_DBLCLK           = NM_FIRST-3
NM_RETURN           = NM_FIRST-4
NM_RCLICK           = NM_FIRST-5
NM_RDBLCLK          = NM_FIRST-6
NM_SETFOCUS         = NM_FIRST-7
NM_KILLFOCUS        = NM_FIRST-8
CCS_TOP             = 00000001h
CCS_NOMOVEY         = 00000002h
CCS_BOTTOM          = 00000003h
CCS_NORESIZE        = 00000004h
CCS_NOPARENTALIGN   = 00000008h
CCS_ADJUSTABLE      = 00000020h
CCS_NODIVIDER       = 00000040h
CCM_FIRST           = 2000h
CCM_LAST            =    CCM_FIRST + 200h
CCM_SETBKCOLOR          = CCM_FIRST + 1
CCM_SETCOLORSCHEME      = CCM_FIRST + 2
CCM_GETCOLORSCHEME      = CCM_FIRST + 3
CCM_GETDROPTARGET       = CCM_FIRST + 4
CCM_SETUNICODEFORMAT    = CCM_FIRST + 5
CCM_GETUNICODEFORMAT    = CCM_FIRST + 6
LVN_FIRST        = 0-100
LVN_LAST         = 0-199
HDN_FIRST        = 0-300
HDN_LAST         = 0-399
TVN_FIRST        = 0-400
TVN_LAST         = 0-499
TTN_FIRST        = 0-520
TTN_LAST         = 0-549
TCN_FIRST        = 0-550
TCN_LAST         = 0-580
CDN_FIRST        = 0-601
CDN_LAST         = 0-699
TBN_FIRST        = 0-700
TBN_LAST         = 0-720
UDN_FIRST        = 0-721
UDN_LAST         = 0-740
MCN_FIRST        = 0-750
MCN_LAST         = 0-759
DTN_FIRST        = 0-760
DTN_LAST         = 0-799
CBEN_FIRST       = 0-800
CBEN_LAST        = 0-830
RBN_FIRST        = 0-831
RBN_LAST         = 0-859
IPN_FIRST        = 0-860
IPN_LAST         = 0-879
SBN_FIRST        = 0-880
SBN_LAST         = 0-899
PGN_FIRST        = 0-900
PGN_LAST         = 0-950
PGM_FIRST               = 1400h
MSGF_COMMCTRL_BEGINDRAG            = 4200h
MSGF_COMMCTRL_SIZEHEADER           = 4201h
MSGF_COMMCTRL_DRAGSELECT           = 4202h
MSGF_COMMCTRL_TOOLBARCUST          = 4203h
ICC_LISTVIEW_CLASSES             = 00000001h
ICC_TREEVIEW_CLASSES             = 00000002h
ICC_BAR_CLASSES  = 00000004h
ICC_TAB_CLASSES  = 00000008h
ICC_UPDOWN_CLASS = 00000010h
ICC_PROGRESS_CLASS               = 00000020h
ICC_HOTKEY_CLASS = 00000040h
ICC_ANIMATE_CLASS                = 00000080h
ICC_WIN95_CLASSES                = 000000FFh
ICC_DATE_CLASSES = 00000100h
ICC_USEREX_CLASSES               = 00000200h
ICC_COOL_CLASSES = 00000400h
ICC_INTERNET_CLASSES             = 00000800h
ICC_PAGESCROLLER_CLASS           = 00001000h
ICC_NATIVEFNTCTL_CLASS           = 00002000h
RBIM_IMAGELIST = 1
RBS_TOOLTIPS   = 100h
RBS_VARHEIGHT  = 200h
RBS_BANDBORDERS                = 400h
RBS_FIXEDORDER = 800h
RBS_REGISTERDROP               = 1000h
RBS_AUTOSIZE   = 2000h
RBS_VERTICALGRIPPER            = 4000h
RBS_DBLCLKTOGGLE               = 8000h
RBBS_BREAK     = 1
RBBS_FIXEDSIZE = 2
RBBS_CHILDEDGE = 4
RBBS_HIDDEN    = 8
RBBS_NOVERT    = 10h
RBBS_FIXEDBMP  = 20h
RBBS_VARIABLEHEIGHT            = 40h
RBBS_GRIPPERALWAYS             = 80h
RBBS_NOGRIPPER = 100h
RBBIM_STYLE    = 1
RBBIM_COLORS   = 2
RBBIM_TEXT     = 4
RBBIM_IMAGE    = 8
RBBIM_CHILD    = 10h
RBBIM_CHILDSIZE = 20h
RBBIM_SIZE     = 40h
RBBIM_BACKGROUND               = 80h
RBBIM_ID       = 100h
RBBIM_IDEALSIZE                = 00000200h
RBBIM_LPARAM   = 00000400h
RBBIM_HEADERSIZE               = 00000800h
RB_INSERTBANDA = WM_USER +  1
RB_INSERTBANDW = (WM_USER + 10)
if UNICODE eq TRUE
    RB_INSERTBAND = RB_INSERTBANDW
else
    RB_INSERTBAND = RB_INSERTBANDA
end if

RB_DELETEBAND  = WM_USER +  2
RB_GETBARINFO  = WM_USER +  3
RB_SETBARINFO  = WM_USER +  4
RB_GETBANDINFOA = WM_USER +  29
RB_GETBANDINFOW = (WM_USER + 28)
if UNICODE eq TRUE
    RB_GETBANDINFO = RB_GETBANDINFOW
else
    RB_GETBANDINFO = RB_GETBANDINFOA
end if

RB_SETBANDINFOA = WM_USER +  6
RB_SETBANDINFOW = (WM_USER + 11)
if UNICODE eq TRUE
    RB_SETBANDINFO = RB_SETBANDINFOW
else
    RB_SETBANDINFO = RB_SETBANDINFOA
end if

RB_SETPARENT   = WM_USER +  7
RB_HITTEST     = WM_USER +  8
RB_GETRECT     = WM_USER +  9
RB_GETBANDCOUNT                = WM_USER +  12
RB_GETROWCOUNT = WM_USER +  13
RB_GETROWHEIGHT                = WM_USER +  14
RB_IDTOINDEX   = WM_USER +  16
RB_GETTOOLTIPS = WM_USER +  17
RB_SETTOOLTIPS = WM_USER +  18
RB_SETBKCOLOR  = WM_USER +  19
RB_GETBKCOLOR  = WM_USER +  20
RB_SETTEXTCOLOR                = WM_USER +  21
RB_GETTEXTCOLOR                = WM_USER +  22
RB_SIZETORECT  = WM_USER +  23
RB_SETCOLORSCHEME              = CCM_SETCOLORSCHEME
RB_GETCOLORSCHEME              = CCM_GETCOLORSCHEME
RB_BEGINDRAG   = WM_USER + 24
RB_ENDDRAG     = WM_USER + 25
RB_DRAGMOVE    = WM_USER + 26
RB_GETBARHEIGHT                = WM_USER + 27
RB_MINIMIZEBAND                = WM_USER + 30
RB_MAXIMIZEBAND                = WM_USER + 31
RB_GETDROPTARGET               = CCM_GETDROPTARGET
RB_GETBANDBORDERS              = WM_USER + 34
RB_SHOWBAND    = WM_USER + 35
RB_SETPALETTE  = WM_USER + 37
RB_GETPALETTE  = WM_USER + 38
RB_MOVEBAND    = WM_USER + 39
RB_SETUNICODEFORMAT            = CCM_SETUNICODEFORMAT
RB_GETUNICODEFORMAT            = CCM_GETUNICODEFORMAT
RBN_HEIGHTCHANGE               = RBN_FIRST - 0
RBN_GETOBJECT  = RBN_FIRST - 1
RBN_LAYOUTCHANGED              = RBN_FIRST - 2
RBN_AUTOSIZE   = RBN_FIRST - 3
RBN_BEGINDRAG  = RBN_FIRST - 4
RBN_ENDDRAG    = RBN_FIRST - 5
RBN_DELETINGBAND               = RBN_FIRST - 6
RBN_DELETEDBAND                = RBN_FIRST - 7
RBN_CHILDSIZE  = RBN_FIRST - 8
RBNM_ID        = 00000001h
RBNM_STYLE     = 00000002h
RBNM_LPARAM    = 00000004h
RBHT_NOWHERE   = 0001h
RBHT_CAPTION   = 0002h
RBHT_CLIENT    = 0003h
RBHT_GRABBER   = 0004h
CLR_NONE         = 0FFFFFFFFh
CLR_DEFAULT      = 0FF000000h
ILC_MASK         = 0001h
ILC_COLOR        = 0000h
ILC_COLORDDB     = 00FEh
ILC_COLOR4       = 0004h
ILC_COLOR8       = 0008h
ILC_COLOR16      = 0010h
ILC_COLOR24      = 0018h
ILC_COLOR32      = 0020h
ILC_PALETTE      = 0800h
ILD_NORMAL       = 0000h
ILD_TRANSPARENT  = 0001h
ILD_MASK         = 0010h
ILD_IMAGE        = 0020h
ILD_BLEND25      = 0002h
ILD_BLEND50      = 0004h
ILD_OVERLAYMASK  = 0F00h
ILD_SELECTED     = ILD_BLEND50
ILD_FOCUS        = ILD_BLEND25
ILD_BLEND        = ILD_BLEND50
CLR_HILIGHT      = CLR_DEFAULT
HDS_HORZ         = 00000000h
HDS_BUTTONS      = 00000002h
HDS_HIDDEN       = 00000008h
HDI_WIDTH        = 0001h
HDI_HEIGHT       = HDI_WIDTH
HDI_TEXT         = 0002h
HDI_FORMAT       = 0004h
HDI_LPARAM       = 0008h
HDI_BITMAP       = 0010h
HDI_IMAGE        = 0020h
HDI_DI_SETITEM   = 0040h
HDI_ORDER        = 0080h
HDF_LEFT         = 0
HDF_RIGHT        = 1
HDF_CENTER       = 2
HDF_JUSTIFYMASK  = 0003h
HDF_RTLREADING   = 4
HDF_IMAGE        = 0800h
HDF_OWNERDRAW    = 8000h
HDF_STRING       = 4000h
HDF_BITMAP_ON_RIGHT = 1000h
HDF_BITMAP       = 2000h
HDM_GETITEMCOUNT = HDM_FIRST + 0
HDM_INSERTITEMA   =  HDM_FIRST + 1
HDM_INSERTITEMW  =  HDM_FIRST + 10
if UNICODE eq TRUE
    HDM_INSERTITEM = HDM_INSERTITEMW
else
    HDM_INSERTITEM = HDM_INSERTITEMA
end if

HDM_DELETEITEM  =  HDM_FIRST + 2
HDM_GETITEMA     =  HDM_FIRST + 3
HDM_GETITEMW     =  HDM_FIRST + 11
if UNICODE eq TRUE
    HDM_GETITEM = HDM_GETITEMW
else
    HDM_GETITEM = HDM_GETITEMA
end if

HDM_SETITEMA     = HDM_FIRST + 4
HDM_SETITEMW     = HDM_FIRST + 12
if UNICODE eq TRUE
    HDM_SETITEM = HDM_SETITEMW
else
    HDM_SETITEM = HDM_SETITEMA
end if

HDM_LAYOUT       = HDM_FIRST + 5
HHT_NOWHERE      = 0001h
HHT_ONHEADER     = 0002h
HHT_ONDIVIDER    = 0004h
HHT_ONDIVOPEN    = 0008h
HHT_ABOVE        = 0100h
HHT_BELOW        = 0200h
HHT_TORIGHT      = 0400h
HHT_TOLEFT       = 0800h
HDM_HITTEST      = HDM_FIRST + 6
HDN_ITEMCHANGINGA = HDN_FIRST - 0
HDN_ITEMCHANGINGW = HDN_FIRST - 20
if UNICODE eq TRUE
    HDN_ITEMCHANGING = HDN_ITEMCHANGINGW
else
    HDN_ITEMCHANGING = HDN_ITEMCHANGINGA
end if

HDN_ITEMCHANGED  = HDN_FIRST - 1
HDN_ITEMCHANGEDW = HDN_FIRST - 21
HDN_ITEMCLICK    = HDN_FIRST - 2
HDN_ITEMCLICKW   = HDN_FIRST - 22
HDN_ITEMDBLCLICKA = HDN_FIRST - 3
HDN_ITEMDBLCLICKW = HDN_FIRST - 23
if UNICODE eq TRUE
    HDN_ITEMDBLCLICK = HDN_ITEMDBLCLICKW
else
    HDN_ITEMDBLCLICK = HDN_ITEMDBLCLICKA
end if

HDN_DIVIDERDBLCLICKA = HDN_FIRST - 5
HDN_DIVIDERDBLCLICKW = HDN_FIRST - 25
if UNICODE eq TRUE
    HDN_DIVIDERDBLCLICK = HDN_DIVIDERDBLCLICKW
else
    HDN_DIVIDERDBLCLICK = HDN_DIVIDERDBLCLICKA
end if

HDN_BEGINTRACKA  = HDN_FIRST - 6
HDN_BEGINTRACKW  = HDN_FIRST - 26
if UNICODE eq TRUE
    HDN_BEGINTRACK = HDN_BEGINTRACKW
else
    HDN_BEGINTRACK = HDN_BEGINTRACKA
end if

HDN_ENDTRACKA    = HDN_FIRST - 7
HDN_ENDTRACKW    = HDN_FIRST - 27
if UNICODE eq TRUE
    HDN_ENDTRACK = HDN_ENDTRACKW
else
    HDN_ENDTRACK = HDN_ENDTRACKA
end if

HDN_TRACKA      = HDN_FIRST - 8
HDN_TRACKW      = HDN_FIRST - 28
if UNICODE eq TRUE
    HDN_TRACK = HDN_TRACKW
else
    HDN_TRACK = HDN_TRACKA
end if

CMB_MASKED      = 02h
TBSTATE_CHECKED = 01h
TBSTATE_PRESSED = 02h
TBSTATE_ENABLED = 04h
TBSTATE_HIDDEN  = 08h
TBSTATE_INDETERMINATE           = 10h
TBSTATE_WRAP    = 20h
TBSTYLE_BUTTON  = 00h
TBSTYLE_SEP     = 01h
TBSTYLE_CHECK   = 02h
TBSTYLE_GROUP   = 04h
TBSTYLE_CHECKGROUP              = TBSTYLE_GROUP or TBSTYLE_CHECK
TBSTYLE_TOOLTIPS = 0100h
TBSTYLE_WRAPABLE = 0200h
TBSTYLE_ALTDRAG  = 0400h
TBSTYLE_FLAT     = 0800h
TBSTYLE_LIST     = 1000h
TBSTYLE_CUSTOMERASE              = 2000h
TBSTYLE_REGISTERDROP             = 4000h
TBSTYLE_TRANSPARENT              = 8000h
TB_ENABLEBUTTON  = WM_USER + 1
TB_CHECKBUTTON   = WM_USER + 2
TB_PRESSBUTTON   = WM_USER + 3
TB_HIDEBUTTON    = WM_USER + 4
TB_INDETERMINATE = WM_USER + 5
TB_ISBUTTONENABLED               = WM_USER + 9
TB_ISBUTTONCHECKED               = WM_USER + 10
TB_ISBUTTONPRESSED               = WM_USER + 11
TB_ISBUTTONHIDDEN                = WM_USER + 12
TB_ISBUTTONINDETERMINATE          = WM_USER + 13
TB_SETSTATE      = WM_USER + 17
TB_GETSTATE      = WM_USER + 18
TB_ADDBITMAP     = WM_USER + 19
TB_SETSTYLE      = WM_USER + 56
TB_GETSTYLE      = WM_USER + 57
HINST_COMMCTRL   = -1
IDB_STD_SMALL_COLOR              = 0
IDB_STD_LARGE_COLOR              = 1
IDB_VIEW_SMALL_COLOR             = 4
IDB_VIEW_LARGE_COLOR             = 5
STD_CUT          = 0
STD_COPY         = 1
STD_PASTE        = 2
STD_UNDO         = 3
STD_REDOW        = 4
STD_DELETE       = 5
STD_FILENEW      = 6
STD_FILEOPEN     = 7
STD_FILESAVE     = 8
STD_PRINTPRE     = 9
STD_PROPERTIES   = 10
STD_HELP         = 11
STD_FIND         = 12
STD_REPLACE      = 13
STD_PRINT        = 14
VIEW_LARGEICONS  = 0
VIEW_SMALLICONS  = 1
VIEW_LIST        = 2
VIEW_DETAILS     = 3
VIEW_SORTNAME    = 4
VIEW_SORTSIZE    = 5
VIEW_SORTDATE    = 6
VIEW_SORTTYPE    = 7
VIEW_PARENTFOLDER                = 8
VIEW_NETCONNECT  = 9
VIEW_NETDISCONNECT               = 10
VIEW_NEWFOLDER   = 11
TB_ADDBUTTONSA   = WM_USER + 20
TB_ADDBUTTONSW   = WM_USER + 68
if UNICODE eq TRUE
    TB_ADDBUTTONS = TB_ADDBUTTONSW
else
    TB_ADDBUTTONS = TB_ADDBUTTONSA
end if

TB_INSERTBUTTONA = WM_USER + 21
TB_INSERTBUTTONW  = WM_USER + 67
if UNICODE eq TRUE
    TB_INSERTBUTTON = TB_INSERTBUTTONW
else
    TB_INSERTBUTTON = TB_INSERTBUTTONA
end if

TB_DELETEBUTTON  = WM_USER + 22
TB_GETBUTTON     = WM_USER + 23
TB_BUTTONCOUNT   = WM_USER + 24
TB_COMMANDTOINDEX                = WM_USER + 25
TB_SAVERESTOREA  = WM_USER + 26
TB_SAVERESTOREW  = WM_USER + 76
if UNICODE eq TRUE
    TB_SAVERESTORE = TB_SAVERESTOREW
else
    TB_SAVERESTORE = TB_SAVERESTOREA
end if

TB_CUSTOMIZE     = WM_USER + 27
TB_ADDSTRINGA    = WM_USER + 28
TB_ADDSTRINGW    = WM_USER + 77
if UNICODE eq TRUE
    TB_ADDSTRING = TB_ADDSTRINGW
else
    TB_ADDSTRING = TB_ADDSTRINGA
end if

TB_GETITEMRECT   = WM_USER + 29
TB_BUTTONSTRUCTSIZE              = WM_USER + 30
TB_SETBUTTONSIZE = WM_USER + 31
TB_SETBITMAPSIZE = WM_USER + 32
TB_AUTOSIZE      = WM_USER + 33
TB_GETTOOLTIPS   = WM_USER + 35
TB_SETTOOLTIPS   = WM_USER + 36
TB_SETPARENT     = WM_USER + 37
TB_SETROWS       = WM_USER + 39
TB_GETROWS       = WM_USER + 40
TB_SETCMDID      = WM_USER + 42
TB_CHANGEBITMAP  = WM_USER + 43
TB_GETBITMAP     = WM_USER + 44
TB_GETBUTTONTEXTA = WM_USER + 45
TB_GETBUTTONTEXTW = WM_USER + 75
if UNICODE eq TRUE
    TB_GETBUTTONTEXT = TB_GETBUTTONTEXTW
else
    TB_GETBUTTONTEXT = TB_GETBUTTONTEXTA
end if

TB_REPLACEBITMAP = WM_USER + 46
TBBF_LARGE       = 1
TB_GETBITMAPFLAGS                = WM_USER + 41
TBN_GETBUTTONINFOA = TBN_FIRST
TBN_GETBUTTONINFOW = TBN_FIRST - 20
if UNICODE eq TRUE
    TBN_GETBUTTONINFO = TBN_GETBUTTONINFOW
else
    TBN_GETBUTTONINFO = TBN_GETBUTTONINFOA
end if

TBN_BEGINDRAG    = TBN_FIRST-1
TBN_ENDDRAG      = TBN_FIRST-2
TBN_BEGINADJUST  = TBN_FIRST-3
TBN_ENDADJUST    = TBN_FIRST-4
TBN_RESET        = TBN_FIRST-5
TBN_QUERYINSERT  = TBN_FIRST-6
TBN_QUERYDELETE  = TBN_FIRST-7
TBN_TOOLBARCHANGE                = TBN_FIRST-8
TBN_CUSTHELP     = TBN_FIRST-9
TTS_ALWAYSTIP    = 01h
TTS_NOPREFIX     = 02h
TTF_IDISHWND     = 01h
TTF_CENTERTIP    = 02h
TTF_RTLREADING   = 04h
TTF_SUBCLASS     = 10h
TTDT_AUTOMATIC   = 0
TTDT_RESHOW      = 1
TTDT_AUTOPOP     = 2
TTDT_INITIAL     = 3
TTM_ACTIVATE     = WM_USER + 1
TTM_SETDELAYTIME = WM_USER + 3
TTM_ADDTOOLA     = WM_USER + 4
TTM_ADDTOOLW     = WM_USER + 50
if UNICODE eq TRUE
    TTM_ADDTOOL = TTM_ADDTOOLW
else
    TTM_ADDTOOL = TTM_ADDTOOLA
end if

TTM_DELTOOLA     = WM_USER + 5
TTM_DELTOOLW     = WM_USER + 51
if UNICODE eq TRUE
    TTM_DELTOOL = TTM_DELTOOLW
else
    TTM_DELTOOL = TTM_DELTOOLA
end if

TTM_NEWTOOLRECTA = WM_USER + 6
TTM_NEWTOOLRECTW = WM_USER + 52
if UNICODE eq TRUE
    TTM_NEWTOOLRECT = TTM_NEWTOOLRECTW
else
    TTM_NEWTOOLRECT = TTM_NEWTOOLRECTA
end if

TTM_RELAYEVENT   = WM_USER + 7
TTM_GETTOOLINFOA = WM_USER + 8
TTM_GETTOOLINFOW = WM_USER + 53
if UNICODE eq TRUE
    TTM_GETTOOLINFO = TTM_GETTOOLINFOW
else
    TTM_GETTOOLINFO = TTM_GETTOOLINFOA
end if

TTM_SETTOOLINFOA = WM_USER + 9
TTM_SETTOOLINFOW = WM_USER + 54
if UNICODE eq TRUE
    TTM_SETTOOLINFO = TTM_SETTOOLINFOW
else
    TTM_SETTOOLINFO = TTM_SETTOOLINFOA
end if

TTM_HITTESTA     = WM_USER +10
TTM_HITTESTW     = WM_USER +55
if UNICODE eq TRUE
    TTM_HITTEST = TTM_HITTESTW
else
    TTM_HITTEST = TTM_HITTESTA
end if

TTM_GETTEXTA     = WM_USER +11
TTM_GETTEXTW     = WM_USER +56
if UNICODE eq TRUE
    TTM_GETTEXT = TTM_GETTEXTW
else
    TTM_GETTEXT = TTM_GETTEXTA
end if

TTM_UPDATETIPTEXTA = WM_USER +12
TTM_UPDATETIPTEXTW = WM_USER +57
if UNICODE eq TRUE
    TTM_UPDATETIPTEXT = TTM_UPDATETIPTEXTW
else
    TTM_UPDATETIPTEXT = TTM_UPDATETIPTEXTA
end if

TTM_GETTOOLCOUNT = WM_USER +13
TTM_ENUMTOOLSA   = WM_USER +14
TTM_ENUMTOOLSW   = WM_USER +58
if UNICODE eq TRUE
    TTM_ENUMTOOLS = TTM_ENUMTOOLSW
else
    TTM_ENUMTOOLS = TTM_ENUMTOOLSA
end if

TTM_GETCURRENTTOOLA = WM_USER + 15
TTM_GETCURRENTTOOLW = WM_USER + 59
if UNICODE eq TRUE
    TTM_GETCURRENTTOOL = TTM_GETCURRENTTOOLW
else
    TTM_GETCURRENTTOOL = TTM_GETCURRENTTOOLA
end if

TTM_WINDOWFROMPOINT              = WM_USER + 16
TTN_NEEDTEXTA    = TTN_FIRST - 0
TTN_NEEDTEXTW    = TTN_FIRST - 10
if UNICODE eq TRUE
    TTN_NEEDTEXT = TTN_NEEDTEXTW
else
    TTN_NEEDTEXT = TTN_NEEDTEXTA
end if

TTN_SHOW         = TTN_FIRST - 1
TTN_POP          = TTN_FIRST - 2
SBARS_SIZEGRIP   = 0100h
SB_SETTEXTA     = WM_USER+1
SB_SETTEXTW     = WM_USER+11
if UNICODE eq TRUE
    SB_SETTEXT = SB_SETTEXTW
else
    SB_SETTEXT = SB_SETTEXTA
end if

SB_GETTEXTA     = WM_USER+2
SB_GETTEXTW     = WM_USER+13
if UNICODE eq TRUE
    SB_GETTEXT = SB_GETTEXTW
else
    SB_GETTEXT = SB_GETTEXTA
end if

SB_GETTEXTLENGTHA = WM_USER+3
SB_GETTEXTLENGTHW = WM_USER+12
if UNICODE eq TRUE
    SB_GETTEXTLENGTH = SB_GETTEXTLENGTHW
else
    SB_GETTEXTLENGTH = SB_GETTEXTLENGTHA
end if

SB_SETPARTS      = WM_USER+4
SB_GETPARTS      = WM_USER+6
SB_GETBORDERS    = WM_USER+7
SB_SETMINHEIGHT  = WM_USER+8
SB_SIMPLE        = WM_USER+9
SB_GETRECT       = WM_USER+10
SBT_OWNERDRAW     = 1000h
SBT_NOBORDERS     = 0100h
SBT_POPOUT        = 0200h
SBT_RTLREADING    = 0400h
MINSYSCOMMAND           = SC_SIZE
TBS_AUTOTICKS   = 0001h
TBS_VERT        = 0002h
TBS_HORZ        = 0000h
TBS_TOP         = 0004h
TBS_BOTTOM      = 0000h
TBS_LEFT        = 0004h
TBS_RIGHT       = 0000h
TBS_BOTH        = 0008h
TBS_NOTICKS     = 0010h
TBS_ENABLESELRANGE              = 0020h
TBS_FIXEDLENGTH = 0040h
TBS_NOTHUMB     = 0080h
TBM_GETPOS      = WM_USER
TBM_GETRANGEMIN = WM_USER+1
TBM_GETRANGEMAX = WM_USER+2
TBM_GETTIC      = WM_USER+3
TBM_SETTIC      = WM_USER+4
TBM_SETPOS      = WM_USER+5
TBM_SETRANGE    = WM_USER+6
TBM_SETRANGEMIN = WM_USER+7
TBM_SETRANGEMAX = WM_USER+8
TBM_CLEARTICS   = WM_USER+9
TBM_SETSEL      = WM_USER+10
TBM_SETSELSTART = WM_USER+11
TBM_SETSELEND   = WM_USER+12
TBM_GETPTICS    = WM_USER+14
TBM_GETTICPOS   = WM_USER+15
TBM_GETNUMTICS  = WM_USER+16
TBM_GETSELSTART = WM_USER+17
TBM_GETSELEND   = WM_USER+18
TBM_CLEARSEL    = WM_USER+19
TBM_SETTICFREQ  = WM_USER+20
TBM_SETPAGESIZE = WM_USER+21
TBM_GETPAGESIZE = WM_USER+22
TBM_SETLINESIZE = WM_USER+23
TBM_GETLINESIZE = WM_USER+24
TBM_GETTHUMBRECT                = WM_USER+25
TBM_GETCHANNELRECT              = WM_USER+26
TBM_SETTHUMBLENGTH              = WM_USER+27
TBM_GETTHUMBLENGTH              = WM_USER+28
TB_LINEUP       = 0
TB_LINEDOWN     = 1
TB_PAGEUP       = 2
TB_PAGEDOWN     = 3
TB_THUMBPOSITION                = 4
TB_THUMBTRACK   = 5
TB_TOP          = 6
TB_BOTTOM       = 7
TB_ENDTRACK     = 8
DL_BEGINDRAG    = WM_USER+133
DL_DRAGGING     = WM_USER+134
DL_DROPPED      = WM_USER+135
DL_CANCELDRAG   = WM_USER+136
DL_CURSORSET    = 0
DL_STOPCURSOR   = 1
DL_COPYCURSOR   = 2
DL_MOVECURSOR   = 3
UD_MAXVAL       = 7FFFh
UD_MINVAL       = - UD_MAXVAL
UDS_WRAP        = 0001h
UDS_SETBUDDYINT = 0002h
UDS_ALIGNRIGHT  = 0004h
UDS_ALIGNLEFT   = 0008h
UDS_AUTOBUDDY   = 0010h
UDS_ARROWKEYS   = 0020h
UDS_HORZ        = 0040h
UDS_NOTHOUSANDS = 0080h
UDM_SETRANGE    = WM_USER+101
UDM_GETRANGE    = WM_USER+102
UDM_SETPOS      = WM_USER+103
UDM_GETPOS      = WM_USER+104
UDM_SETBUDDY    = WM_USER+105
UDM_GETBUDDY    = WM_USER+106
UDM_SETACCEL    = WM_USER+107
UDM_GETACCEL    = WM_USER+108
UDM_SETBASE     = WM_USER+109
UDM_GETBASE     = WM_USER+110
UDN_DELTAPOS          = UDN_FIRST - 1
PBM_SETRANGE    = WM_USER+1
PBM_SETPOS      = WM_USER+2
PBM_DELTAPOS    = WM_USER+3
PBM_SETSTEP     = WM_USER+4
PBM_STEPIT      = WM_USER+5
HOTKEYF_SHIFT   = 01h
HOTKEYF_CONTROL = 02h
HOTKEYF_ALT     = 04h
HOTKEYF_EXT     = 08h
HKCOMB_NONE     = 0001h
HKCOMB_S        = 0002h
HKCOMB_C        = 0004h
HKCOMB_A        = 0008h
HKCOMB_SC       = 0010h
HKCOMB_SA       = 0020h
HKCOMB_CA       = 0040h
HKCOMB_SCA      = 0080h
HKM_SETHOTKEY   = WM_USER+1
HKM_GETHOTKEY   = WM_USER+2
HKM_SETRULES    = WM_USER+3
LVS_ICON        = 0000h
LVS_REPORT      = 0001h
LVS_SMALLICON   = 0002h
LVS_LIST        = 0003h
LVS_TYPEMASK    = 0003h
LVS_SINGLESEL   = 0004h
LVS_SHOWSELALWAYS               = 0008h
LVS_SORTASCENDING               = 0010h
LVS_SORTDESCENDING              = 0020h
LVS_SHAREIMAGELISTS             = 0040h
LVS_NOLABELWRAP = 0080h
LVS_AUTOARRANGE = 0100h
LVS_EDITLABELS  = 0200h
LVS_NOSCROLL    = 2000h
LVS_TYPESTYLEMASK               = 0fc00h
LVS_ALIGNTOP    = 0000h
LVS_ALIGNLEFT   = 0800h
LVS_ALIGNMASK   = 0c00h
LVS_OWNERDRAWFIXED              = 0400h
LVS_NOCOLUMNHEADER              = 4000h
LVS_NOSORTHEADER                = 8000h
LVM_GETBKCOLOR  = LVM_FIRST + 0
LVM_SETBKCOLOR  = LVM_FIRST + 1
LVM_GETIMAGELIST                = LVM_FIRST + 2
LVM_SUBITEMHITTEST              = LVM_FIRST + 57
LVSIL_NORMAL    = 0
LVSIL_SMALL     = 1
LVSIL_STATE     = 2
LVM_SETIMAGELIST                = LVM_FIRST + 3
LVM_GETITEMCOUNT                = LVM_FIRST + 4
LVIF_TEXT       = 0001h
LVIF_IMAGE      = 0002h
LVIF_PARAM      = 0004h
LVIF_STATE      = 0008h
LVIS_FOCUSED    = 0001h
LVIS_SELECTED   = 0002h
LVIS_CUT        = 0004h
LVIS_DROPHILITED                = 0008h
LVIS_OVERLAYMASK                = 0F00h
LVIS_STATEIMAGEMASK             = 0F000h
LPSTR_TEXTCALLBACKA             = -1
LPSTR_TEXTCALLBACKW             = -1
if UNICODE eq TRUE
    LPSTR_TEXTCALLBACK = LPSTR_TEXTCALLBACKW
else
    LPSTR_TEXTCALLBACK = LPSTR_TEXTCALLBACKA
end if

I_IMAGECALLBACK = -1
LVM_GETITEMA    = LVM_FIRST + 5
LVM_GETITEMW    = LVM_FIRST + 75
if UNICODE eq TRUE
    LVM_GETITEM = LVM_GETITEMW
else
    LVM_GETITEM = LVM_GETITEMA
end if

LVM_SETITEMA    = LVM_FIRST + 6
LVM_SETITEMW    = LVM_FIRST + 76
if UNICODE eq TRUE
    LVM_SETITEM = LVM_SETITEMW
else
    LVM_SETITEM = LVM_SETITEMA
end if

LVM_INSERTITEMA = LVM_FIRST + 7
LVM_INSERTITEMW = LVM_FIRST + 77
if UNICODE eq TRUE
    LVM_INSERTITEM = LVM_INSERTITEMW
else
    LVM_INSERTITEM = LVM_INSERTITEMA
end if

LVM_DELETEITEM  = LVM_FIRST + 8
LVM_DELETEALLITEMS              = LVM_FIRST + 9
LVM_GETCALLBACKMASK             = LVM_FIRST + 10
LVM_SETCALLBACKMASK             = LVM_FIRST + 11
LVNI_ALL        = 0000h
LVNI_FOCUSED    = 0001h
LVNI_SELECTED   = 0002h
LVNI_CUT        = 0004h
LVNI_DROPHILITED                = 0008h
LVNI_ABOVE      = 0100h
LVNI_BELOW      = 0200h
LVNI_TOLEFT     = 0400h
LVNI_TORIGHT    = 0800h
LVM_GETNEXTITEM = LVM_FIRST + 12
LVFI_PARAM      = 0001h
LVFI_STRING     = 0002h
LVFI_PARTIAL    = 0008h
LVFI_WRAP       = 0020h
LVFI_NEARESTXY  = 0040h
LVM_FINDITEMA    = LVM_FIRST + 13
LVM_FINDITEMW   = LVM_FIRST + 83
if UNICODE eq TRUE
    LVM_FINDITEM = LVM_FINDITEMW
else
    LVM_FINDITEM = LVM_FINDITEMA
end if

LVIR_BOUNDS     = 0
LVIR_ICON       = 1
LVIR_LABEL      = 2
LVIR_SELECTBOUNDS               = 3
LVM_GETITEMRECT = LVM_FIRST + 14
LVM_SETITEMPOSITION = LVM_FIRST + 15
LVM_GETITEMPOSITION = LVM_FIRST + 16
LVM_GETSTRINGWIDTHA = LVM_FIRST + 17
LVM_GETSTRINGWIDTHW = LVM_FIRST + 87
if UNICODE eq TRUE
    LVM_GETSTRINGWIDTH = LVM_GETSTRINGWIDTHW
else
    LVM_GETSTRINGWIDTH = LVM_GETSTRINGWIDTHA
end if

LVHT_NOWHERE    = 0001h
LVHT_ONITEMICON = 0002h
LVHT_ONITEMLABEL                = 0004h
LVHT_ONITEMSTATEICON            = 0008h
LVHT_ONITEM     = LVHT_ONITEMICON or LVHT_ONITEMLABEL or LVHT_ONITEMSTATEICON
LVHT_ABOVE      = 0008h
LVHT_BELOW      = 0010h
LVHT_TORIGHT    = 0020h
LVHT_TOLEFT     = 0040h
LVM_HITTEST     = LVM_FIRST + 18
LVM_ENSUREVISIBLE               = LVM_FIRST + 19
LVM_SCROLL      = LVM_FIRST + 20
LVM_REDRAWITEMS = LVM_FIRST + 21
LVA_DEFAULT     = 0000h
LVA_ALIGNLEFT   = 0001h
LVA_ALIGNTOP    = 0002h
LVA_SNAPTOGRID  = 0005h
LVM_ARRANGE     = LVM_FIRST + 22
LVM_EDITLABELA  = LVM_FIRST + 23
LVM_EDITLABELW  = LVM_FIRST + 118
if UNICODE eq TRUE
    LVM_EDITLABEL = LVM_EDITLABELW
else
    LVM_EDITLABEL = LVM_EDITLABELA
end if

LVM_GETEDITCONTROL              = LVM_FIRST + 24
LVCF_FMT        = 0001h
LVCF_WIDTH      = 0002h
LVCF_TEXT       = 0004h
LVCF_SUBITEM    = 0008h
LVCFMT_LEFT     = 0000h
LVCFMT_RIGHT    = 0001h
LVCFMT_CENTER   = 0002h
LVCFMT_JUSTIFYMASK              = 0003h
LVM_GETCOLUMNA  = LVM_FIRST + 25
LVM_GETCOLUMNW  = LVM_FIRST + 95
if UNICODE eq TRUE
    LVM_GETCOLUMN = LVM_GETCOLUMNW
else
    LVM_GETCOLUMN = LVM_GETCOLUMNA
end if

LVM_SETCOLUMNA  = LVM_FIRST + 26
LVM_SETCOLUMNW  = LVM_FIRST + 96
if UNICODE eq TRUE
    LVM_SETCOLUMN = LVM_SETCOLUMNW
else
    LVM_SETCOLUMN = LVM_SETCOLUMNA
end if

LVM_INSERTCOLUMNA = LVM_FIRST + 27
LVM_INSERTCOLUMNW = LVM_FIRST + 97
if UNICODE eq TRUE
    LVM_INSERTCOLUMN = LVM_INSERTCOLUMNW
else
    LVM_INSERTCOLUMN = LVM_INSERTCOLUMNA
end if

LVM_DELETECOLUMN                = LVM_FIRST + 28
LVM_GETCOLUMNWIDTH              = LVM_FIRST + 29
LVSCW_AUTOSIZE      = -1
LVSCW_AUTOSIZE_USEHEADER            = -2
LVM_SETCOLUMNWIDTH  = LVM_FIRST + 30
LVM_CREATEDRAGIMAGE             = LVM_FIRST + 33
LVM_GETVIEWRECT = LVM_FIRST + 34
LVM_GETTEXTCOLOR                = LVM_FIRST + 35
LVM_SETTEXTCOLOR                = LVM_FIRST + 36
LVM_GETTEXTBKCOLOR              = LVM_FIRST + 37
LVM_SETTEXTBKCOLOR              = LVM_FIRST + 38
LVM_GETTOPINDEX = LVM_FIRST + 39
LVM_GETCOUNTPERPAGE             = LVM_FIRST + 40
LVM_GETORIGIN   = LVM_FIRST + 41
LVM_UPDATE      = LVM_FIRST + 42
LVM_SETITEMSTATE                = LVM_FIRST + 43
LVM_GETITEMSTATE                = LVM_FIRST + 44
LVM_GETITEMTEXTA = LVM_FIRST + 45
LVM_GETITEMTEXTW = LVM_FIRST + 115
if UNICODE eq TRUE
    LVM_GETITEMTEXT = LVM_GETITEMTEXTW
else
    LVM_GETITEMTEXT = LVM_GETITEMTEXTA
end if

LVM_SETITEMTEXTA = LVM_FIRST + 46
LVM_SETITEMTEXTW = LVM_FIRST + 116
if UNICODE eq TRUE
    LVM_SETITEMTEXT = LVM_SETITEMTEXTW
else
    LVM_SETITEMTEXT = LVM_SETITEMTEXTA
end if

LVM_SETITEMCOUNT                = LVM_FIRST + 47
LVM_SORTITEMS   = LVM_FIRST + 48
LVM_SETITEMPOSITION32           = LVM_FIRST + 49
LVM_GETSELECTEDCOUNT            = LVM_FIRST + 50
LVM_GETITEMSPACING              = LVM_FIRST + 51
LVM_GETISEARCHSTRINGA = LVM_FIRST + 52
LVM_GETISEARCHSTRINGW = LVM_FIRST + 117
if UNICODE eq TRUE
    LVM_GETISEARCHSTRING = LVM_GETISEARCHSTRINGW
else
    LVM_GETISEARCHSTRING = LVM_GETISEARCHSTRINGA
end if

LVN_ITEMCHANGING                = LVN_FIRST-0
LVN_ITEMCHANGED = LVN_FIRST-1
LVN_INSERTITEM  = LVN_FIRST-2
LVN_DELETEITEM  = LVN_FIRST-3
LVN_DELETEALLITEMS              = LVN_FIRST-4
LVN_BEGINLABELEDITA = LVN_FIRST-5
LVN_BEGINLABELEDITW = LVN_FIRST-75
if UNICODE eq TRUE
    LVN_BEGINLABELEDIT = LVN_BEGINLABELEDITW
else
    LVN_BEGINLABELEDIT = LVN_BEGINLABELEDITA
end if

LVN_ENDLABELEDITA = LVN_FIRST-6
LVN_ENDLABELEDITW = LVN_FIRST-76
if UNICODE eq TRUE
    LVN_ENDLABELEDIT = LVN_ENDLABELEDITW
else
    LVN_ENDLABELEDIT = LVN_ENDLABELEDITA
end if

LVN_COLUMNCLICK = LVN_FIRST-8
LVN_BEGINDRAG   = LVN_FIRST-9
LVN_BEGINRDRAG  = LVN_FIRST-11
LVN_GETDISPINFOA = LVN_FIRST-50
LVN_GETDISPINFOW = LVN_FIRST-77
if UNICODE eq TRUE
    LVN_GETDISPINFO = LVN_GETDISPINFOW
else
    LVN_GETDISPINFO = LVN_GETDISPINFOA
end if

LVN_SETDISPINFOA = LVN_FIRST-51
LVN_SETDISPINFOW = LVN_FIRST-78
if UNICODE eq TRUE
    LVN_SETDISPINFO = LVN_SETDISPINFOW
else
    LVN_SETDISPINFO = LVN_SETDISPINFOA
end if

LVIF_DI_SETITEM = 1000h
LVN_KEYDOWN     = LVN_FIRST-55
TVS_HASBUTTONS  = 0001h
TVS_HASLINES    = 0002h
TVS_LINESATROOT = 0004h
TVS_EDITLABELS  = 0008h
TVS_DISABLEDRAGDROP             = 0010h
TVS_SHOWSELALWAYS               = 0020h
TVIF_TEXT       = 0001h
TVIF_IMAGE      = 0002h
TVIF_PARAM      = 0004h
TVIF_STATE      = 0008h
TVIF_HANDLE     = 0010h
TVIF_SELECTEDIMAGE              = 0020h
TVIF_CHILDREN   = 0040h
TVIS_FOCUSED    = 0001h
TVIS_SELECTED   = 0002h
TVIS_CUT        = 0004h
TVIS_DROPHILITED                = 0008h
TVIS_BOLD       = 0010h
TVIS_EXPANDED   = 0020h
TVIS_EXPANDEDONCE               = 0040h
TVIS_OVERLAYMASK                = 0F00h
TVIS_STATEIMAGEMASK             = 0F000h
TVIS_USERMASK   = 0F000h
I_CHILDRENCALLBACK              = -1
TVI_ROOT        = 0FFFF0000h
TVI_FIRST       = 0FFFF0001h
TVI_LAST        = 0FFFF0002h
TVI_SORT        = 0FFFF0003h
TVM_INSERTITEMA = TV_FIRST + 0
TVM_INSERTITEMW = TV_FIRST + 50
if UNICODE eq TRUE
    TVM_INSERTITEM = TVM_INSERTITEMW
else
    TVM_INSERTITEM = TVM_INSERTITEMA
end if

TVM_DELETEITEM  = TV_FIRST + 1
TVM_EXPAND      = TV_FIRST + 2
TVE_COLLAPSE    = 0001h
TVE_EXPAND      = 0002h
TVE_TOGGLE      = 0003h
TVE_COLLAPSERESET               = 8000h
TVM_GETITEMRECT = TV_FIRST + 4
TVM_GETCOUNT    = TV_FIRST + 5
TVM_GETINDENT   = TV_FIRST + 6
TVM_SETINDENT   = TV_FIRST + 7
TVM_GETIMAGELIST                = TV_FIRST + 8
TVSIL_NORMAL    = 0
TVSIL_STATE     = 2
TVM_SETIMAGELIST                = TV_FIRST + 9
TVM_GETNEXTITEM = TV_FIRST + 10
TVGN_ROOT       = 0000h
TVGN_NEXT       = 0001h
TVGN_PREVIOUS   = 0002h
TVGN_PARENT     = 0003h
TVGN_CHILD      = 0004h
TVGN_FIRSTVISIBLE               = 0005h
TVGN_NEXTVISIBLE                = 0006h
TVGN_PREVIOUSVISIBLE            = 0007h
TVGN_DROPHILITE = 0008h
TVGN_CARET      = 0009h
TVM_SELECTITEM  = TV_FIRST + 11
TVM_GETITEMA    = TV_FIRST + 12
TVM_GETITEMW    = TV_FIRST + 62
if UNICODE eq TRUE
    TVM_GETITEM = TVM_GETITEMW
else
    TVM_GETITEM = TVM_GETITEMA
end if

TVM_SETITEMA    = TV_FIRST + 13
TVM_SETITEMW    = TV_FIRST + 63
if UNICODE eq TRUE
    TVM_SETITEM = TVM_SETITEMW
else
    TVM_SETITEM = TVM_SETITEMA
end if

TVM_EDITLABELA  = TV_FIRST + 14
TVM_EDITLABELW  = TV_FIRST + 65
if UNICODE eq TRUE
    TVM_EDITLABEL = TVM_EDITLABELW
else
    TVM_EDITLABEL = TVM_EDITLABELA
end if

TVM_GETEDITCONTROL              = TV_FIRST + 15
TVM_GETVISIBLECOUNT             = TV_FIRST + 16
TVM_HITTEST     = TV_FIRST + 17
TVHT_NOWHERE    = 0001h
TVHT_ONITEMICON = 0002h
TVHT_ONITEMLABEL                = 0004h
TVHT_ONITEMSTATEICON            = 0040h
TVHT_ONITEM     = TVHT_ONITEMICON or TVHT_ONITEMLABEL or TVHT_ONITEMSTATEICON
TVHT_ONITEMINDENT               = 0008h
TVHT_ONITEMBUTTON               = 0010h
TVHT_ONITEMRIGHT                = 0020h
TVHT_ABOVE      = 0100h
TVHT_BELOW      = 0200h
TVHT_TORIGHT    = 0400h
TVHT_TOLEFT     = 0800h
TVM_CREATEDRAGIMAGE             = TV_FIRST + 18
TVM_SORTCHILDREN                = TV_FIRST + 19
TVM_ENSUREVISIBLE               = TV_FIRST + 20
TVM_SORTCHILDRENCB              = TV_FIRST + 21
TVM_GETISEARCHSTRINGA           = TV_FIRST + 23
TVM_GETISEARCHSTRINGW           = TV_FIRST + 64
if UNICODE eq TRUE
    TVM_GETISEARCHSTRING = TVM_GETISEARCHSTRINGW
else
    TVM_GETISEARCHSTRING = TVM_GETISEARCHSTRINGA
end if

TVN_SELCHANGINGA                = TVN_FIRST-1
TVN_SELCHANGINGW                = TVN_FIRST-50
if UNICODE eq TRUE
    TVN_SELCHANGING = TVN_SELCHANGINGW
else
    TVN_SELCHANGING = TVN_SELCHANGINGA
end if

TVN_SELCHANGEDA = TVN_FIRST-2
TVN_SELCHANGEDW = TVN_FIRST-51
if UNICODE eq TRUE
    TVN_SELCHANGED = TVN_SELCHANGEDW
else
    TVN_SELCHANGED = TVN_SELCHANGEDA
end if

TVC_UNKNOWN     = 0000h
TVC_BYMOUSE     = 0001h
TVC_BYKEYBOARD  = 0002h
TVN_GETDISPINFOA               = TVN_FIRST-3
TVN_GETDISPINFOW               = TVN_FIRST-52
if UNICODE eq TRUE
    TVN_GETDISPINFO = TVN_GETDISPINFOW
else
    TVN_GETDISPINFO = TVN_GETDISPINFOA
end if

TVN_SETDISPINFOA = TVN_FIRST-4
TVN_SETDISPINFOW = TVN_FIRST-53
if UNICODE eq TRUE
    TVN_SETDISPINFO = TVN_SETDISPINFOW
else
    TVN_SETDISPINFO = TVN_SETDISPINFOA
end if

TVIF_DI_SETITEM = 1000h
TVN_ITEMEXPANDINGA = TVN_FIRST-5
TVN_ITEMEXPANDINGW = TVN_FIRST-54
if UNICODE eq TRUE
    TVN_ITEMEXPANDING = TVN_ITEMEXPANDINGW
else
    TVN_ITEMEXPANDING = TVN_ITEMEXPANDINGA
end if

TVN_ITEMEXPANDEDA = TVN_FIRST-6
TVN_ITEMEXPANDEDW = TVN_FIRST-55
if UNICODE eq TRUE
    TVN_ITEMEXPANDED = TVN_ITEMEXPANDEDW
else
    TVN_ITEMEXPANDED = TVN_ITEMEXPANDEDA
end if

TVN_BEGINDRAGA  = TVN_FIRST-7
TVN_BEGINDRAGW  = TVN_FIRST-56
if UNICODE eq TRUE
    TVN_BEGINDRAG = TVN_BEGINDRAGW
else
    TVN_BEGINDRAG = TVN_BEGINDRAGA
end if

TVN_BEGINRDRAGA = TVN_FIRST-8
TVN_BEGINRDRAGW = TVN_FIRST-57
if UNICODE eq TRUE
    TVN_BEGINRDRAG = TVN_BEGINRDRAGW
else
    TVN_BEGINRDRAG = TVN_BEGINRDRAGA
end if

TVN_DELETEITEMA = TVN_FIRST-9
TVN_DELETEITEMW = TVN_FIRST-58
if UNICODE eq TRUE
    TVN_DELETEITEM = TVN_DELETEITEMW
else
    TVN_DELETEITEM = TVN_DELETEITEMA
end if

TVN_BEGINLABELEDITA = TVN_FIRST-10
TVN_BEGINLABELEDITW = TVN_FIRST-59
if UNICODE eq TRUE
    TVN_BEGINLABELEDIT = TVN_BEGINLABELEDITW
else
    TVN_BEGINLABELEDIT = TVN_BEGINLABELEDITA
end if

TVN_ENDLABELEDITA = TVN_FIRST-11
TVN_ENDLABELEDITW = TVN_FIRST-60
if UNICODE eq TRUE
    TVN_ENDLABELEDIT = TVN_ENDLABELEDITW
else
    TVN_ENDLABELEDIT = TVN_ENDLABELEDITA
end if

TVN_GETINFOTIPA = TVN_FIRST-13
TVN_GETINFOTIPW = TVN_FIRST-14
if UNICODE eq TRUE
    TVN_GETINFOTIP = TVN_GETINFOTIPW
else
    TVN_GETINFOTIP = TVN_GETINFOTIPA
end if

TVN_KEYDOWN     = TVN_FIRST-12
TCS_FORCEICONLEFT                = 0010h
TCS_FORCELABELLEFT               = 0020h
TCS_TABS         = 0000h
TCS_BUTTONS      = 0100h
TCS_SINGLELINE   = 0000h
TCS_MULTILINE    = 0200h
TCS_RIGHTJUSTIFY = 0000h
TCS_FIXEDWIDTH   = 0400h
TCS_RAGGEDRIGHT  = 0800h
TCS_FOCUSONBUTTONDOWN            = 1000h
TCS_OWNERDRAWFIXED               = 2000h
TCS_TOOLTIPS     = 4000h
TCS_FOCUSNEVER   = 8000h
TCM_FIRST        = 1300h
TCM_GETIMAGELIST = TCM_FIRST + 2
TCM_SETIMAGELIST                = TCM_FIRST + 3
TCM_GETITEMCOUNT = TCM_FIRST + 4
TCIF_TEXT        = 0001h
TCIF_IMAGE       = 0002h
TCIF_RTLREADING  = 0004h
TCIF_PARAM       = 0008h
TCM_GETITEMA     = TCM_FIRST + 5
TCM_GETITEMW     = TCM_FIRST + 60
if UNICODE eq TRUE
    TCM_GETITEM = TCM_GETITEMW
else
    TCM_GETITEM = TCM_GETITEMA
end if

TCM_SETITEMA    = TCM_FIRST + 6
TCM_SETITEMW    = TCM_FIRST + 61
if UNICODE eq TRUE
    TCM_SETITEM = TCM_SETITEMW
else
    TCM_SETITEM = TCM_SETITEMA
end if

TCM_INSERTITEMA = TCM_FIRST + 7
TCM_INSERTITEMW = TCM_FIRST + 62
if UNICODE eq TRUE
    TCM_INSERTITEM = TCM_INSERTITEMW
else
    TCM_INSERTITEM = TCM_INSERTITEMA
end if

TCM_DELETEITEM   = TCM_FIRST + 8
TCM_DELETEALLITEMS               = TCM_FIRST + 9
TCM_GETITEMRECT  = TCM_FIRST + 10
TCM_GETCURSEL    = TCM_FIRST + 11
TCM_SETCURSEL    = TCM_FIRST + 12
TCHT_NOWHERE     = 0001h
TCHT_ONITEMICON  = 0002h
TCHT_ONITEMLABEL = 0004h
TCHT_ONITEM      = TCHT_ONITEMICON or TCHT_ONITEMLABEL
TCM_HITTEST      = TCM_FIRST + 13
TCM_SETITEMEXTRA = TCM_FIRST + 14
TCM_ADJUSTRECT   = TCM_FIRST + 40
TCM_SETITEMSIZE  = TCM_FIRST + 41
TCM_REMOVEIMAGE  = TCM_FIRST + 42
TCM_SETPADDING   = TCM_FIRST + 43
TCM_GETROWCOUNT  = TCM_FIRST + 44
TCM_GETTOOLTIPS  = TCM_FIRST + 45
TCM_SETTOOLTIPS  = TCM_FIRST + 46
TCM_GETCURFOCUS  = TCM_FIRST + 47
TCM_SETCURFOCUS  = TCM_FIRST + 48
TCN_KEYDOWN      = TCN_FIRST - 0
TCN_SELCHANGE    = TCN_FIRST - 1
TCN_SELCHANGING  = TCN_FIRST - 2
ACS_CENTER      = 0001h
ACS_TRANSPARENT = 0002h
ACS_AUTOPLAY    = 0004h
ACM_OPENA       = WM_USER+100
ACM_OPENW       = WM_USER+103
if UNICODE eq TRUE
    ACM_OPEN = ACM_OPENW
else
    ACM_OPEN = ACM_OPENA
end if

ACM_PLAY        = WM_USER+101
ACM_STOP        = WM_USER+102
ACN_START       = 1
ACN_STOP        = 2

 ; FXPT2DOT30      =  <DWORD>
 ; MMVERSION       =  <DWORD>
 ; SECURITY_CONTEXT_TRACKING_MODE  =  <BOOLEAN>
 ; MAX_JOYSTICKOEMVXDNAME = 260
 ; FOURCC          =  <DWORD>
 ;
 ; LOAD_LIBRARY_AS_DATAFILE        = 2
 ; LOAD_WITH_ALTERED_SEARCH_PATH   = 8
 ;
 ; EVENT_MODIFY_STATE      = 2

; ------------------------- comctl structures ------------------------------

INITCOMMONCONTROLSEX struct
  dwSize  dd      ?
  dwICC   dd      ?
INITCOMMONCONTROLSEX ends

REBARINFO struct
  cbSize    dd      ?
  fMask     dd     ?
  himl      dd      ?
REBARINFO ends

REBARBANDINFO struct
  cbSize        DWORD      ?
  fMask         DWORD      ?
  fStyle        DWORD      ?
  clrFore       DWORD      ?
  clrBack       DWORD      ?
  lpText        DWORD      ?
  cch           DWORD      ?
  iImage        DWORD      ?
  hwndChild     DWORD      ?
  cxMinChild    DWORD      ?
  cyMinChild    DWORD      ?
  lx            DWORD      ?
  hbmBack       DWORD      ?
  wID           DWORD      ?
  cyChild       DWORD      ?
  cyMaxChild    DWORD      ?
  cyIntegral    DWORD      ?
  cxIdeal       DWORD      ?
  lParam        DWORD      ?
  cxHeader      DWORD      ?
REBARBANDINFO ends
TYPEDEF LPREBARBANDINFO, PVOID
TYPEDEF LPCREBARBANDINFO, LPREBARBANDINFO

NMHDR struct
    hwndFrom    DWORD ?
    idFrom      DWORD ?
    code        DWORD ?
NMHDR ends

NMREBARCHILDSIZE struct
  hdr       NMHDR       <>
  uBand     DWORD       ?
  wID       DWORD       ?
  rcChild   RECT        <>
  rcBand    RECT        <>
NMREBARCHILDSIZE ends

NMREBAR struct
  hdr       NMHDR     <>
  dwMask    DWORD      ?
  uBand     DWORD      ?
  fStyle    DWORD      ?
  wID       DWORD      ?
  lParam    DWORD      ?
NMREBAR ends

NMRBAUTOSIZE struct
  hdr  NMHDR      <>
  fChanged  DWORD      ?
  rcTarget  RECT      <>
  rcActual  RECT      <>
NMRBAUTOSIZE ends

RBHITTESTINFO struct
  pt     POINT      <>
  flags  DWORD      ?
  iBand  DWORD      ?
RBHITTESTINFO ends

IMAGEINFO struct
  hbmImage   HBITMAP      ?
  hbmMask    HBITMAP      ?
  Unused1    DWORD        ?
  Unused2    DWORD        ?
  rcImage    RECT         <>
IMAGEINFO ends

HD_ITEM struct
  imask          DWORD      ?
  lxy            DWORD      ?
  pszText        DWORD      ?
  hbm            DWORD      ?
  cchTextMax     DWORD      ?
  fmt            DWORD      ?
  lParam         DWORD      ?
  iImage         DWORD ?
  iOrder         DWORD ?
  itype dd ?
  pvFilter dd ?
HD_ITEM ends

HD_LAYOUT struct
  prc    DWORD      ?
  pwpos  DWORD      ?
HD_LAYOUT ends

HD_HITTESTINFO struct
  pt         POINT      <>
  flags      DWORD      ?
  iItem      DWORD      ?
HD_HITTESTINFO ends

NMHEADER struct
    hdr NMHDR   <>
    iItem DWORD ?
    iButton DWORD ?
    pitem DWORD ?
NMHEADER ends
TYPEDEF HD_NOTIFY, NMHEADER

TBBUTTON struct
  iBitmap           DWORD      ?
  idCommand         DWORD      ?
  fsState           BYTE       ?
  fsStyle           BYTE       ?
  _wPad1            WORD       ?
  dwData            DWORD      ?
  iString           DWORD      ?
TBBUTTON ends

COLORMAP struct
  From       DWORD      ?
  To         DWORD      ?
COLORMAP ends

TBADDBITMAP struct
  hInst          DWORD      ?
  nID            DWORD      ?
TBADDBITMAP ends

TBREPLACEBITMAP struct
  hInstOld           DWORD      ?
  nIdOld             DWORD      ?
  hInstNew           DWORD      ?
  nIdNew             DWORD      ?
  nButtons           DWORD      ?
TBREPLACEBITMAP ends

TBSAVEPARAMS struct
  hkr               DWORD  ?
  pszSubKey         DWORD  ?
  pszValueName      DWORD  ?
TBSAVEPARAMS ends

TOOLINFO struct
  cbSize             DWORD      ?
  uFlags             DWORD      ?
  hWnd               DWORD      ?
  uId                DWORD      ?
  rect               RECT      <>
  hInst              DWORD      ?
  lpszText           DWORD      ?
  lParam             LPARAM     ?
TOOLINFO ends
TYPEDEF TTTOOLINFO, TOOLINFO
TYPEDEF LPTOOLINFO, PVOID
TYPEDEF LPTTTOOLINFO, LPTOOLINFO
TYPEDEF PTOOLINFO, LPTOOLINFO

TT_HITTESTINFO struct
  hWnd          DWORD      ?
  pt            POINT      <>
  ti            TOOLINFO  <>
TT_HITTESTINFO ends

NMTTDISPINFO struct
  hdr               NMHDR  <>
  lpszText          DWORD  ?
  szText            TCHAR 80 dup(?)
  union
    hInst           DWORD  ?
    hinst           DWORD  ?
  ends
  uFlags            DWORD  ?
  lParam            DWORD  ?
NMTTDISPINFO ends
TYPEDEF TOOLTIPTEXT, NMTTDISPINFO
TYPEDEF LPNMTTDISPINFO, PVOID
TYPEDEF LPTOOLTIPTEXT, LPNMTTDISPINFO

DRAGLISTINFO struct
  uNotification     DWORD ?
  hWnd              DWORD ?
  ptCursor          POINT <>
DRAGLISTINFO ends

UDACCEL struct
  nSec  DWORD ?
  nInc  DWORD ?
UDACCEL ends

NM_UPDOWN struct
  hdr       NMHDR <>
  iPos      DWORD ?
  iDelta    DWORD ?
NM_UPDOWN ends
TYPEDEF NMUPDOWN, NM_UPDOWN

LV_ITEM struct
  imask         DWORD      ?
  iItem         DWORD      ?
  iSubItem      DWORD      ?
  state         DWORD      ?
  stateMask     DWORD      ?
  pszText       DWORD      ?
  cchTextMax    DWORD      ?
  iImage        DWORD      ?
  lParam        DWORD      ?
  iIndent       DWORD      ?
LV_ITEM ends
TYPEDEF LVITEM, LV_ITEM
TYPEDEF LPLVITEM, PVOID

LV_FINDINFO struct
  flags         DWORD      ?
  psz           DWORD      ?
  lParam        DWORD      ?
  pt            POINT      <>
  vkDirection   DWORD      ?
LV_FINDINFO ends
TYPEDEF LVFINDINFO, LV_FINDINFO

LV_HITTESTINFO struct
  pt        POINT <>
  flags     DWORD ?
  iItem     DWORD ?
  iSubItem  DWORD ?
LV_HITTESTINFO ends
TYPEDEF LVHITTESTINFO, LV_HITTESTINFO

LV_COLUMN struct
  imask         DWORD      ?
  fmt           DWORD      ?
  lx            DWORD      ?
  pszText       DWORD      ?
  cchTextMax    DWORD      ?
  iSubItem      DWORD      ?
  iImage        DWORD ?
  iOrder        DWORD ?
LV_COLUMN ends
TYPEDEF LVCOLUMN, LV_COLUMN
TYPEDEF LPLVCOLUMN, PVOID

NM_LISTVIEW struct
  hdr           NMHDR      <>
  iItem         DWORD      ?
  iSubItem      DWORD      ?
  uNewState     DWORD      ?
  uOldState     DWORD      ?
  uChanged      DWORD      ?
  ptAction      POINT      <>
  lParam        DWORD      ?
NM_LISTVIEW ends
TYPEDEF NMLISTVIEW, NM_LISTVIEW
TYPEDEF LPNM_LISTVIEW, PVOID
TYPEDEF LPNMLISTVIEW, LPNM_LISTVIEW

LV_DISPINFO struct
  hdr   NMHDR  <>
  item  LVITEM <>
LV_DISPINFO ends
TYPEDEF NMLVDISPINFO, LV_DISPINFO

LV_KEYDOWN struct
  hdr       NMHDR      <>
  wVKey     WORD      ?
  flags     DWORD      ?
LV_KEYDOWN ends
TYPEDEF NMLVKEYDOWN, LV_KEYDOWN

_mask fix imask

TVITEM struct
  _mask             DWORD  ?
  hItem             DWORD  ?
  state             DWORD  ?
  stateMask         DWORD  ?
  pszText           DWORD  ?
  cchTextMax        DWORD  ?
  iImage            DWORD  ?
  iSelectedImage    DWORD  ?
  cChildren         DWORD  ?
  lParam            DWORD  ?
TVITEM ends
TYPEDEF TV_ITEM, TVITEM
TYPEDEF LPTVITEM, PVOID
TYPEDEF LPTV_ITEM, LPTVITEM

TV_ITEMEX struct
  imask             DWORD      ?
  hItem             DWORD      ?
  state             DWORD      ?
  stateMask         DWORD      ?
  pszText           DWORD      ?
  cchTextMax        DWORD      ?
  iImage            DWORD      ?
  iSelectedImage    DWORD      ?
  cChildren         DWORD      ?
  lParam            DWORD      ?
  iIntegral         DWORD      ?
TV_ITEMEX ends
TYPEDEF TVITEMEX, TV_ITEMEX

ITEMTYPE union
        itemex TVITEMEX <>
        item TVITEM <>
ITEMTYPE ends

TV_INSERTSTRUCT struct
  hParent       DWORD      ?
  hInsertAfter  DWORD ?
               ITEMTYPE <>
TV_INSERTSTRUCT ends
TYPEDEF TVINSERTSTRUCT, TV_INSERTSTRUCT
TYPEDEF LPTV_INSERTSTRUCT, PVOID
TYPEDEF LPTVINSERTSTRUCT, LPTV_INSERTSTRUCT

TV_HITTESTINFO struct
  pt        POINT      <>
  flags     DWORD      ?
  hItem     DWORD      ?
TV_HITTESTINFO ends
TYPEDEF TVHITTESTINFO, TV_HITTESTINFO
TYPEDEF LPTV_HITTESTINFO, PVOID
TYPEDEF LPTVHITTESTINFO, LPTV_HITTESTINFO

TV_SORTCB struct
  hParent       DWORD      ?
  lpfnCompare   DWORD      ?
  lParam        DWORD      ?
TV_SORTCB ends
TYPEDEF TVSORTCB, TV_SORTCB
TYPEDEF LPTV_SORTCB, PVOID
TYPEDEF LPTVSORTCB, LPTV_SORTCB

NM_TREEVIEW struct
  hdr       NMHDR      <>
  action    DWORD      ?
  itemOld   TVITEM      <>
  itemNew   TVITEM      <>
  ptDrag    POINT      <>
NM_TREEVIEW ends
TYPEDEF NMTREEVIEW, NM_TREEVIEW
TYPEDEF LPNM_TREEVIEW, PVOID
TYPEDEF LPNMTREEVIEW, LPNM_TREEVIEW

TV_DISPINFO struct
  hdr   NMHDR <>
  item  TVITEM <>
TV_DISPINFO ends
TYPEDEF NMTVDISPINFO, TV_DISPINFO
TYPEDEF LPNMTVGETINFOTIP, PVOID

TV_KEYDOWN struct
  hdr       NMHDR      <>
  wVKey     WORD      ?
  flags     DWORD      ?
TV_KEYDOWN ends
TYPEDEF NMTVKEYDOWN, TV_KEYDOWN

TC_ITEMHEADER struct
  imask             DWORD      ?
  lpReserved1       DWORD      ?
  lpReserved2       DWORD      ?
  pszText           DWORD      ?
  cchTextMax        DWORD      ?
  iImage            DWORD      ?
TC_ITEMHEADER ends
TYPEDEF TCITEMHEADER, TC_ITEMHEADER
TYPEDEF LPTC_ITEMHEADER, PVOID
TYPEDEF LPTCITEMHEADER, LPTC_ITEMHEADER

TC_ITEM struct
  imask             DWORD      ?
  lpReserved1       DWORD      ?
  lpReserved2       DWORD      ?
  pszText           DWORD      ?
  cchTextMax        DWORD      ?
  iImage            DWORD      ?
  lParam            DWORD      ?
TC_ITEM ends
TYPEDEF TCITEM, TC_ITEM
TYPEDEF LPTC_ITEM, PVOID
TYPEDEF LPTCITEM, LPTC_ITEM

TC_HITTESTINFO struct
  pt        POINT      <>
  flags     DWORD      ?
TC_HITTESTINFO ends
TYPEDEF TCHITTESTINFO, TC_HITTESTINFO
TYPEDEF LPTC_HITTESTINFO, PVOID
TYPEDEF LPTCHITTESTINFO, LPTC_HITTESTINFO

TC_KEYDOWN struct
  hdr            NMHDR      <>
  wVKey          WORD       ?
  flags          DWORD      ?
TC_KEYDOWN ends
TYPEDEF NMTCKEYDOWN,  TC_KEYDOWN

; --------------------------------------------------
; Additional Common Control Equates 28 January 2003
; --------------------------------------------------

CCM_SETVERSION          = CCM_FIRST + 7
CCM_GETVERSION          = CCM_FIRST + 8
CCM_SETNOTIFYWINDOW     = CCM_FIRST + 9
INFOTIPSIZE             = 1024
NM_CUSTOMDRAW           = NM_FIRST - 12
NM_HOVER                = NM_FIRST - 13
NM_NCHITTEST            = NM_FIRST - 14 ; uses NMMOUSE type
NM_KEYDOWN              = NM_FIRST - 15 ; uses NMKEY type
NM_RELEASEDCAPTURE      = NM_FIRST - 16
NM_SETCURSOR            = NM_FIRST - 17 ; uses NMMOUSE type
NM_CHAR                 = NM_FIRST - 18 ; uses NMCHAR type
NM_TOOLTIPSCREATED      = NM_FIRST - 19 ; notify of when the tooltips window is create
NM_LDOWN                = NM_FIRST - 20
NM_RDOWN                = NM_FIRST - 21
WMN_FIRST               = 0-1000
WMN_LAST                = 0-1200
CDRF_DODEFAULT          = 00000000h
CDRF_NEWFONT            = 00000002h
CDRF_SKIPDEFAULT        = 00000004h
CDRF_NOTIFYPOSTPAINT    = 00000010h
CDRF_NOTIFYITEMDRAW     = 00000020h
CDRF_NOTIFYSUBITEMDRAW  = 00000020h
CDRF_NOTIFYPOSTERASE    = 00000040h
CDDS_PREPAINT           = 00000001h
CDDS_POSTPAINT          = 00000002h
CDDS_PREERASE           = 00000003h
CDDS_POSTERASE          = 00000004h
CDDS_ITEM               = 00010000h
CDDS_ITEMPREPAINT       = (CDDS_ITEM or CDDS_PREPAINT)
CDDS_ITEMPOSTPAINT      = (CDDS_ITEM or CDDS_POSTPAINT)
CDDS_ITEMPREERASE       = (CDDS_ITEM or CDDS_PREERASE)
CDDS_ITEMPOSTERASE      = (CDDS_ITEM or CDDS_POSTERASE)
CDDS_SUBITEM            = 00020000h
CDIS_SELECTED           = 0001h
CDIS_GRAYED             = 0002h
CDIS_DISABLED           = 0004h
CDIS_CHECKED            = 0008h
CDIS_FOCUS              = 0010h
CDIS_DEFAULT            = 0020h
CDIS_HOT                = 0040h
CDIS_MARKED             = 0080h
CDIS_INDETERMINATE      = 0100h
ILD_ROP                 = 0040h
ILCF_MOVE               = 00000000h
ILCF_SWAP               = 00000001h
HDS_HOTTRACK            = 0004h
HDS_DRAGDROP            = 0040h
HDS_FULLDRAG            = 0080h
HDS_FILTERBAR           = 0100h
HDFT_ISSTRING           = 00000000h
HDFT_ISNUMBER           = 00000001h
HDFT_HASNOVALUE         = 00008000h
HDI_FILTER              = 0100h
HDM_GETITEMRECT         = (HDM_FIRST + 7)
HDM_ORDERTOINDEX        = (HDM_FIRST + 15)
HDM_CREATEDRAGIMAGE     = (HDM_FIRST + 16)
HDM_GETORDERARRAY       = (HDM_FIRST + 17)
HDM_SETORDERARRAY       = (HDM_FIRST + 18)
HDM_SETHOTDIVIDER       = (HDM_FIRST + 19)
HDM_SETBITMAPMARGIN     = (HDM_FIRST + 20)
HDM_GETBITMAPMARGIN     = (HDM_FIRST + 21)
HDM_SETUNICODEFORMAT    = CCM_SETUNICODEFORMAT
HDM_GETUNICODEFORMAT    = CCM_GETUNICODEFORMAT
HDM_SETFILTERCHANGETIMEOUT = (HDM_FIRST + 22)
HDM_EDITFILTER             = (HDM_FIRST + 23)
HDM_CLEARFILTER            = (HDM_FIRST + 24)
HDN_GETDISPINFOA        = (HDN_FIRST - 9)
HDN_GETDISPINFOW        = (HDN_FIRST - 29)
if UNICODE eq TRUE
    HDN_GETDISPINFO = HDN_GETDISPINFOW
else
    HDN_GETDISPINFO = HDN_GETDISPINFOA
end if

HDN_BEGINDRAG           = (HDN_FIRST - 10)
HDN_ENDDRAG             = (HDN_FIRST - 11)
HDN_FILTERCHANGE        = (HDN_FIRST - 12)
HDN_FILTERBTNCLICK      = (HDN_FIRST - 13)
TBSTATE_ELLIPSES        = 0040h
TBSTATE_MARKED          = 0080h
TBSTYLE_DROPDOWN        = 0008h
TBSTYLE_NOPREFIX        = 0020h
TBSTYLE_EX_DRAWDDARROWS = 00000001h
BTNS_BUTTON             = TBSTYLE_BUTTON
BTNS_SEP                = TBSTYLE_SEP
BTNS_CHECK              = TBSTYLE_CHECK
BTNS_GROUP              = TBSTYLE_GROUP
BTNS_CHECKGROUP         = TBSTYLE_CHECKGROUP
BTNS_DROPDOWN           = TBSTYLE_DROPDOWN
BTNS_AUTOSIZE           = TBSTYLE_AUTOSIZE
BTNS_NOPREFIX           = TBSTYLE_NOPREFIX
BTNS_WHOLEDROPDOWN      = 0080h           ; draw drop-down arrow, but without split arrow section
TBSTYLE_EX_MIXEDBUTTONS        = 00000008h
TBSTYLE_EX_HIDECLIPPEDBUTTONS  = 00000010h
TBCDRF_NOEDGES          = 00010000h
TBCDRF_HILITEHOTTRACK   = 00020000h
TBCDRF_NOOFFSET         = 00040000h
TBCDRF_NOMARK           = 00080000h
TBCDRF_NOETCHEDEFFECT   = 00100000h
TBCDRF_BLENDICON        = 00200000h
TB_MARKBUTTON           = WM_USER + 6
TB_ISBUTTONHIGHLIGHTED  = WM_USER + 14
IDB_HIST_SMALL_COLOR    = 8
IDB_HIST_LARGE_COLOR    = 9
VIEW_VIEWMENU           = 12
HIST_BACK               = 0
HIST_FORWARD            = 1
HIST_FAVORITES          = 2
HIST_ADDTOFAVORITES     = 3
HIST_VIEWTREE           = 4
TBIMHT_AFTER            = 00000001h
TBIMHT_BACKGROUND       = 00000002h
TB_GETINSERTMARK        = WM_USER + 79
TB_SETINSERTMARK        = WM_USER + 80
TB_INSERTMARKHITTEST    = WM_USER + 81
TB_MOVEBUTTON           = WM_USER + 82
TB_GETMAXSIZE           = WM_USER + 83
TB_SETEXTENDEDSTYLE     = WM_USER + 84  ; For TBSTYLE_EX_*
TB_GETEXTENDEDSTYLE     = WM_USER + 85  ; For TBSTYLE_EX_*
TB_GETPADDING           = WM_USER + 86
TB_SETPADDING           = WM_USER + 87
TB_SETINSERTMARKCOLOR   = WM_USER + 88
TB_GETINSERTMARKCOLOR   = WM_USER + 89
TB_GETCOLORSCHEME       = CCM_GETCOLORSCHEME  ; fills in COLORSCHEME pointed to by lParam
TB_SETUNICODEFORMAT     = CCM_SETUNICODEFORMAT
TB_GETUNICODEFORMAT     = CCM_GETUNICODEFORMAT
TBIF_IMAGE              = 00000001h
TBIF_TEXT               = 00000002h
TBIF_STATE              = 00000004h
TBIF_STYLE              = 00000008h
TBIF_LPARAM             = 00000010h
TBIF_COMMAND            = 00000020h
TBIF_SIZE               = 00000040h
TBIF_BYINDEX            = 80000000h
TB_GETBUTTONINFOA       = WM_USER + 65
TB_GETBUTTONINFOW       = WM_USER + 63
if UNICODE eq TRUE
    TB_GETBUTTONINFO = TB_GETBUTTONINFOW
else
    TB_GETBUTTONINFO = TB_GETBUTTONINFOA
end if

TB_SETBUTTONINFOA       = WM_USER + 66
TB_SETBUTTONINFOW       = WM_USER + 64
if UNICODE eq TRUE
    TB_SETBUTTONINFO = TB_SETBUTTONINFOW
else
    TB_SETBUTTONINFO = TB_SETBUTTONINFOA
end if

TB_HITTEST              = WM_USER + 69
TB_SETDRAWTEXTFLAGS     = WM_USER + 70
TB_GETSTRINGA           = WM_USER + 92
TB_GETSTRINGW           = WM_USER + 91
if UNICODE eq TRUE
    TB_GETSTRING = TB_GETSTRINGW
else
    TB_GETSTRING = TB_GETSTRINGA
end if

TBN_DROPDOWN            = TBN_FIRST - 10
TBN_GETOBJECT           = TBN_FIRST - 12
HICF_OTHER              = 00000000h
HICF_MOUSE              = 00000001h
HICF_ARROWKEYS          = 00000002h
HICF_ACCELERATOR        = 00000004h
HICF_DUPACCEL           = 00000008h
HICF_ENTERING           = 00000010h
HICF_LEAVING            = 00000020h
HICF_RESELECT           = 00000040h
TBN_HOTITEMCHANGE       = TBN_FIRST - 13
TBN_DRAGOUT             = TBN_FIRST - 14 ; this is sent when the user clicks down on a button then drags off the button
TBN_DELETINGBUTTON      = TBN_FIRST - 15 ; uses TBNOTIFY
TBN_GETDISPINFOA        = TBN_FIRST - 16 ; This is sent when the toolbar needs some display information
TBN_GETDISPINFOW        = TBN_FIRST - 17 ; This is sent when the toolbar needs some display information
if UNICODE eq TRUE
    TBN_GETDISPINFO = TBN_GETDISPINFOW
else
    TBN_GETDISPINFO = TBN_GETDISPINFOA
end if

TBN_GETINFOTIPA         = TBN_FIRST - 18
TBN_GETINFOTIPW         = TBN_FIRST - 19
if UNICODE eq TRUE
    TBN_GETINFOTIP = TBN_GETINFOTIPW
else
    TBN_GETINFOTIP = TBN_GETINFOTIPA
end if

TBN_RESTORE             = TBN_FIRST - 21
TBN_SAVE                = TBN_FIRST - 22
TBN_INITCUSTOMIZE       = TBN_FIRST - 23
TBNRF_HIDEHELP          = 00000001h
TBNRF_ENDCUSTOMIZE      = 00000002h
TBNF_IMAGE              = 00000001h
TBNF_TEXT               = 00000002h
TBNF_DI_SETITEM         = 10000000h
TBDDRET_DEFAULT         = 0
TBDDRET_NODEFAULT       = 1
TBDDRET_TREATPRESSED    = 2       ; Treat as a standard press button
RBBS_HIDETITLE          = 00000400h
RB_PUSHCHEVRON          = (WM_USER + 43)
RBN_CHEVRONPUSHED       = (RBN_FIRST - 10)
RBN_MINMAX              = (RBN_FIRST - 21)
RBHT_CHEVRON            = 0008h
TTS_NOANIMATE           = 10h
TTS_NOFADE              = 20h
TTS_BALLOON             = 40h
TTF_TRACK               = 00000020h
TTF_ABSOLUTE            = 00000080h
TTF_TRANSPARENT         = 00000100h
TTI_NONE                = 0
TTI_INFO                = 1
TTI_WARNING             = 2
TTI_ERROR               = 3
TTM_TRACKACTIVATE       = WM_USER + 17
TTM_TRACKPOSITION       = WM_USER + 18
TTM_SETTIPBKCOLOR       = WM_USER + 19
TTM_SETTIPTEXTCOLOR     = WM_USER + 20
TTM_GETDELAYTIME        = WM_USER + 21
TTM_GETTIPBKCOLOR       = WM_USER + 22
TTM_GETTIPTEXTCOLOR     = WM_USER + 23
TTM_SETMAXTIPWIDTH      = WM_USER + 24
TTM_GETMAXTIPWIDTH      = WM_USER + 25
TTM_SETMARGIN           = WM_USER + 26
TTM_GETMARGIN           = WM_USER + 27
TTM_POP                 = WM_USER + 28
TTM_GETBUBBLESIZE       = WM_USER + 30
TTM_ADJUSTRECT          = WM_USER + 31
TTM_SETTITLEA           = WM_USER + 32
TTM_SETTITLEW           = WM_USER + 33
if UNICODE eq TRUE
    TTM_SETTITLE = TTM_SETTITLEW
else
    TTM_SETTITLE = TTM_SETTITLEA
end if

TTN_GETDISPINFOA        = TTN_FIRST - 0
TTN_GETDISPINFOW        = TTN_FIRST - 10
if UNICODE eq TRUE
    TTN_GETDISPINFO = TTN_GETDISPINFOW
else
    TTN_GETDISPINFO = TTN_GETDISPINFOA
end if

SBARS_TOOLTIPS          = 0800h
SB_ISSIMPLE             = WM_USER + 14
SB_SETICON              = WM_USER + 15
SB_SETTIPTEXTA          = WM_USER + 16
SB_SETTIPTEXTW          = WM_USER + 17
if UNICODE eq TRUE
    SB_SETTIPTEXT = SB_SETTIPTEXTW
else
    SB_SETTIPTEXT = SB_SETTIPTEXTA
end if

SB_GETTIPTEXTA          = WM_USER + 18
SB_GETTIPTEXTW          = WM_USER + 19
if UNICODE eq TRUE
    SB_GETTIPTEXT = SB_GETTIPTEXTW
else
    SB_GETTIPTEXT = SB_GETTIPTEXTA
end if

SB_GETICON              = WM_USER + 20
SB_SETUNICODEFORMAT     = CCM_SETUNICODEFORMAT
SB_GETUNICODEFORMAT     = CCM_GETUNICODEFORMAT
SBT_TOOLTIPS            = 0800h
SBT_NOTABPARSING        = 0800h
SB_SETBKCOLOR           = CCM_SETBKCOLOR
SBN_SIMPLEMODECHANGE    = SBN_FIRST
SB_SIMPLEID             = 00FFh
TBS_TOOLTIPS            = 0100h
TBS_REVERSED            = 0200h
TBM_SETTOOLTIPS         = WM_USER + 29
TBM_GETTOOLTIPS         = WM_USER + 30
TBM_SETTIPSIDE          = WM_USER + 31
TBTS_TOP                = 0
TBTS_LEFT               = 1
TBTS_BOTTOM             = 2
TBTS_RIGHT              = 3
TBM_SETBUDDY            = WM_USER + 32
TBM_GETBUDDY            = WM_USER + 33
TBM_SETUNICODEFORMAT    = CCM_SETUNICODEFORMAT
TBM_GETUNICODEFORMAT    = CCM_GETUNICODEFORMAT
TBCD_TICS               = 0001h
TBCD_THUMB              = 0002h
TBCD_CHANNEL            = 0003h
UDS_HOTTRACK            = 0100h
UDM_SETRANGE32          = WM_USER + 111
UDM_GETRANGE32          = WM_USER + 112
UDM_SETUNICODEFORMAT    = CCM_SETUNICODEFORMAT
UDM_GETUNICODEFORMAT    = CCM_GETUNICODEFORMAT
UDM_SETPOS32            = WM_USER + 113
UDM_GETPOS32            = WM_USER + 114
PBS_SMOOTH              = 01h
PBS_VERTICAL            = 04h
PBM_SETRANGE32          = WM_USER + 6
PBM_GETRANGE            = WM_USER + 7
PBM_GETPOS              = WM_USER + 8
PBM_SETBKCOLOR          = CCM_SETBKCOLOR
PBM_SETBARCOLOR         = WM_USER + 9
CCS_VERT                = 00000080h
CCS_LEFT                = CCS_VERT or CCS_TOP
CCS_RIGHT               = CCS_VERT or CCS_BOTTOM
CCS_NOMOVEX             = CCS_VERT or CCS_NOMOVEY
LVS_OWNERDATA           = 00001000h
LVM_SETUNICODEFORMAT    = CCM_SETUNICODEFORMAT
LVM_GETUNICODEFORMAT    = CCM_GETUNICODEFORMAT
LVIF_INDENT             = 0010h
LVIF_NORECOMPUTE        = 0800h
LVIS_ACTIVATING         = 0020h
LVSICF_NOINVALIDATEALL  = 00000001h
LVSICF_NOSCROLL         = 00000002h
LVM_SETICONSPACING      = LVM_FIRST + 53
LVM_GETSUBITEMRECT      = LVM_FIRST + 56
LVM_SETCOLUMNORDERARRAY = LVM_FIRST + 58
LVM_GETCOLUMNORDERARRAY = LVM_FIRST + 59
LVM_SETHOTITEM          = LVM_FIRST + 60
LVM_GETHOTITEM          = LVM_FIRST + 61
LVM_SETHOTCURSOR        = LVM_FIRST + 62
LVM_GETHOTCURSOR        = LVM_FIRST + 63
LVM_APPROXIMATEVIEWRECT = LVM_FIRST + 64
LV_MAX_WORKARE          = 16
LVM_SETWORKARE          = LVM_FIRST + 65
LVM_GETWORKARE          = LVM_FIRST + 70
LVM_GETNUMBEROFWORKARE  = LVM_FIRST + 73
LVM_GETSELECTIONMARK    = LVM_FIRST + 66
LVM_SETSELECTIONMARK    = LVM_FIRST + 67
LVM_SETHOVERTIME        = LVM_FIRST + 71
LVM_GETHOVERTIME        = LVM_FIRST + 72
LVM_SETTOOLTIPS         = LVM_FIRST + 74
LVM_GETTOOLTIPS         = LVM_FIRST + 78
LVBKIF_SOURCE_NONE      = 00000000h
LVBKIF_SOURCE_HBITMAP   = 00000001h
LVBKIF_SOURCE_URL       = 00000002h
LVBKIF_SOURCE_MASK      = 00000003h
LVBKIF_STYLE_NORMAL     = 00000000h
LVBKIF_STYLE_TILE       = 00000010h
LVBKIF_STYLE_MASK       = 00000010h
LVM_SETBKIMAGEA         = LVM_FIRST + 68
LVM_SETBKIMAGEW         = LVM_FIRST + 138
if UNICODE eq TRUE
    LVM_SETBKIMAGE = LVM_SETBKIMAGEW
else
    LVM_SETBKIMAGE = LVM_SETBKIMAGEA
end if

LVM_GETBKIMAGEA         = LVM_FIRST + 69
LVM_GETBKIMAGEW         = LVM_FIRST + 139
if UNICODE eq TRUE
    LVM_GETBKIMAGE = LVM_GETBKIMAGEW
else
    LVM_GETBKIMAGE = LVM_GETBKIMAGEA
end if

LVKF_ALT                = 0001h
LVKF_CONTROL            = 0002h
LVKF_SHIFT              = 0004h
LVN_ODCACHEHINT         = LVN_FIRST - 13
LVN_ODFINDITEMA         = LVN_FIRST - 52
LVN_ODFINDITEMW         = LVN_FIRST - 79
if UNICODE eq TRUE
    LVN_ODFINDITEM = LVN_ODFINDITEMW
else
    LVN_ODFINDITEM = LVN_ODFINDITEMA
end if

LVN_ITEMACTIVATE        = LVN_FIRST - 14
LVN_ODSTATECHANGED      = LVN_FIRST - 15
LVN_HOTTRACK            = LVN_FIRST - 21
LVN_MARQUEEBEGIN        = LVN_FIRST - 56
LVGIT_UNFOLDED          = 0001h
LVN_GETINFOTIPA         = LVN_FIRST - 57
LVN_GETINFOTIPW         = LVN_FIRST - 58
if UNICODE eq TRUE
    LVN_GETINFOTIP = LVN_GETINFOTIPW
else
    LVN_GETINFOTIP = LVN_GETINFOTIPA
end if

TVS_RTLREADING          = 00000040h
TVS_NOTOOLTIPS          = 00000080h
TVS_CHECKBOXES          = 00000100h
TVS_TRACKSELECT         = 00000200h
TVS_SINGLEEXPAND        = 00000400h
TVS_INFOTIP             = 00000800h
TVS_FULLROWSELECT       = 00001000h
TVS_NOSCROLL            = 00002000h
TVS_NONEVENHEIGHT       = 00004000h
TVS_NOHSCROLL           = 00008000h
TVIF_INTEGRAL           = 0080h
TVIS_EXPANDPARTIAL      = 0080h
TVE_EXPANDPARTIAL       = 00004000h
TVGN_LASTVISIBLE        = 000Ah
TVM_ENDEDITLABELNOW     = TV_FIRST + 22
TVM_SETTOOLTIPS         = TV_FIRST + 24
TVM_GETTOOLTIPS         = TV_FIRST + 25
TVM_SETINSERTMARK       = TV_FIRST + 26
TVM_SETUNICODEFORMAT    = CCM_SETUNICODEFORMAT
TVM_GETUNICODEFORMAT    = CCM_GETUNICODEFORMAT
TVM_SETITEMHEIGHT       = TV_FIRST + 27
TVM_GETITEMHEIGHT       = TV_FIRST + 28
TVM_SETBKCOLOR          = TV_FIRST + 29
TVM_SETTEXTCOLOR        = TV_FIRST + 30
TVM_GETBKCOLOR          = TV_FIRST + 31
TVM_GETTEXTCOLOR        = TV_FIRST + 32
TVM_SETSCROLLTIME       = TV_FIRST + 33
TVM_GETSCROLLTIME       = TV_FIRST + 34
TVM_SETINSERTMARKCOLOR  = TV_FIRST + 37
TVM_GETINSERTMARKCOLOR  = TV_FIRST + 38
TVM_GETITEMSTATE        = TV_FIRST + 39
TVM_SETLINECOLOR        = TV_FIRST + 40
TVM_GETLINECOLOR        = TV_FIRST + 41
TVN_SINGLEEXPAND        = TVN_FIRST - 15
TVNRET_DEFAULT          = 0
TVNRET_SKIPOLD          = 1
TVNRET_SKIPNEW          = 2
TVCDRF_NOIMAGES         = 00010000h
CBEIF_TEXT              = 00000001h
CBEIF_IMAGE             = 00000002h
CBEIF_SELECTEDIMAGE     = 00000004h
CBEIF_OVERLAY           = 00000008h
CBEIF_INDENT            = 00000010h
CBEIF_LPARAM            = 00000020h
CBEIF_DI_SETITEM        = 10000000h
CBEM_INSERTITEMA        = WM_USER + 1
CBEM_INSERTITEMW        = WM_USER + 11
if UNICODE eq TRUE
    CBEM_INSERTITEM = CBEM_INSERTITEMW
else
    CBEM_INSERTITEM = CBEM_INSERTITEMA
end if

CBEM_SETIMAGELIST       = WM_USER + 2
CBEM_GETIMAGELIST       = WM_USER + 3
CBEM_GETITEMA           = WM_USER + 4
CBEM_GETITEMW           = WM_USER + 13
if UNICODE eq TRUE
    CBEM_GETITEM = CBEM_GETITEMW
else
    CBEM_GETITEM = CBEM_GETITEMA
end if

CBEM_SETITEMA           = WM_USER + 5
CBEM_SETITEMW           = WM_USER + 12
if UNICODE eq TRUE
    CBEM_SETITEM = CBEM_SETITEMW
else
    CBEM_SETITEM = CBEM_SETITEMA
end if

CBEM_DELETEITEM         = CB_DELETESTRING
CBEM_GETCOMBOCONTROL    = WM_USER + 6
CBEM_GETEDITCONTROL     = WM_USER + 7
CBEM_SETEXSTYLE         = WM_USER + 8
CBEM_SETEXTENDEDSTYLE   = WM_USER + 14
CBEM_GETEXSTYLE         = WM_USER + 9
CBEM_GETEXTENDEDSTYLE   = WM_USER + 9
CBEM_SETUNICODEFORMAT   = CCM_SETUNICODEFORMAT
CBEM_GETUNICODEFORMAT   = CCM_GETUNICODEFORMAT
CBEM_HASEDITCHANGED     = WM_USER + 10
CBES_EX_NOEDITIMAGE     = 00000001h
CBES_EX_NOEDITIMAGEINDENT   = 00000002h
CBES_EX_PATHWORDBREAKPROC   = 00000004h
CBES_EX_NOSIZELIMIT     = 00000008h
CBES_EX_CASESENSITIVE   = 00000010h
CBEN_GETDISPINFOA       = CBEN_FIRST - 0
CBEN_GETDISPINFOW       = CBEN_FIRST - 7
if UNICODE eq TRUE
    CBEN_GETDISPINFO = CBEN_GETDISPINFOW
else
    CBEN_GETDISPINFO = CBEN_GETDISPINFOA
end if

CBEN_INSERTITEM         = CBEN_FIRST - 1
CBEN_DELETEITEM         = CBEN_FIRST - 2
CBEN_BEGINEDIT          = CBEN_FIRST - 4
CBEN_ENDEDITA           = CBEN_FIRST - 5
CBEN_ENDEDITW           = CBEN_FIRST - 6
if UNICODE eq TRUE
    CBEN_ENDEDIT = CBEN_ENDEDITW
else
    CBEN_ENDEDIT = CBEN_ENDEDITA
end if

CBEN_DRAGBEGINA         = CBEN_FIRST - 8
CBEN_DRAGBEGINW         = CBEN_FIRST - 9
if UNICODE eq TRUE
    CBEN_DRAGBEGIN = CBEN_DRAGBEGINW
else
    CBEN_DRAGBEGIN = CBEN_DRAGBEGINA
end if

CBENF_KILLFOCUS         = 1
CBENF_RETURN            = 2
CBENF_ESCAPE            = 3
CBENF_DROPDOWN          = 4
CBEMAXSTRLEN            = 260
TCS_SCROLLOPPOSITE      = 00000001h
TCS_BOTTOM              = 00000002h
TCS_MULTISELECT         = 00000004h
TCS_HOTTRACK            = 00000040h
TCS_VERTICAL            = 00000080h
TCS_EX_FLATSEPARATORS   = 00000001h
TCS_EX_REGISTERDROP     = 00000002h
TCIF_STATE              = 0010h
TCIS_BUTTONPRESSED      = 0001h
TCIS_HIGHLIGHTED        = 0002h
TCM_SETMINTABWIDTH      = TCM_FIRST + 49
TCM_DESELECTALL         = TCM_FIRST + 50
TCM_HIGHLIGHTITEM       = TCM_FIRST + 51
TCM_SETEXTENDEDSTYLE    = TCM_FIRST + 52
TCM_GETEXTENDEDSTYLE    = TCM_FIRST + 53
TCM_SETUNICODEFORMAT    = CCM_SETUNICODEFORMAT
TCM_GETUNICODEFORMAT    = CCM_GETUNICODEFORMAT
TCN_GETOBJECT           = TCN_FIRST - 3
ACS_TIMER               = 0008h
MCSC_BACKGROUND         = 0   ; the background color (between months)
MCSC_TEXT               = 1   ; the dates
MCSC_TITLEBK            = 2   ; background of the title
MCSC_TITLETEXT          = 3
MCSC_MONTHBK            = 4   ; background within the month cal
MCSC_TRAILINGTEXT       = 5   ; the text color of header & trailing days
MCHT_TITLE              = 00010000h
MCHT_CALENDAR           = 00020000h
MCHT_TODAYLINK          = 00030000h
MCHT_NEXT               = 01000000h
MCHT_PREV               = 02000000h
MCHT_NOWHERE            = 00000000h
MCHT_TITLEBK            = MCHT_TITLE
MCHT_TITLEMONTH         = MCHT_TITLE or 0001h
MCHT_TITLEYEAR          = MCHT_TITLE or 0002h
MCHT_TITLEBTNNEXT       = MCHT_TITLE or MCHT_NEXT or 0003h
MCHT_TITLEBTNPREV       = MCHT_TITLE or MCHT_PREV or 0003h
MCHT_CALENDARBK         = MCHT_CALENDAR
MCHT_CALENDARDATE       = MCHT_CALENDAR or 1
MCHT_CALENDARDATENEXT   = MCHT_CALENDARDATE or MCHT_NEXT
MCHT_CALENDARDATEPREV   = MCHT_CALENDARDATE or MCHT_PREV
MCHT_CALENDARDAY        = MCHT_CALENDAR or 2
MCHT_CALENDARWEEKNUM    = MCHT_CALENDAR or 3
MCM_SETUNICODEFORMAT    = CCM_SETUNICODEFORMAT
MCM_GETUNICODEFORMAT    = CCM_GETUNICODEFORMAT
MCN_SELCHANGE           = MCN_FIRST + 1
MCN_GETDAYSTATE         = MCN_FIRST + 3
MCN_SELECT              = MCN_FIRST + 4
GMR_VISIBLE             = 0
GMR_DAYSTATE            = 1
DTS_DWORDDATEFORMAT     = 0004h
DTS_SHORTDATECENTURYFORMAT = 000Ch
DTN_DATETIMECHANGE      = DTN_FIRST + 1 ; the systemtime has changed
DTN_USERSTRINGA         = DTN_FIRST + 2  ; the user has entered a string
DTN_USERSTRINGW         = DTN_FIRST + 15
if UNICODE eq TRUE
    DTN_USERSTRING = DTN_USERSTRINGW
else
    DTN_USERSTRING = DTN_USERSTRINGA
end if

DTN_WMKEYDOWNA          = DTN_FIRST + 3  ; modify keydown on app format field (X)
DTN_WMKEYDOWNW          = DTN_FIRST + 16
if UNICODE eq TRUE
    DTN_WMKEYDOWN = DTN_WMKEYDOWNW
else
    DTN_WMKEYDOWN = DTN_WMKEYDOWNA
end if

DTN_FORMATA             = DTN_FIRST + 4  ; query display for app format field (X)
DTN_FORMATW             = DTN_FIRST + 17
if UNICODE eq TRUE
    DTN_FORMAT = DTN_FORMATW
else
    DTN_FORMAT = DTN_FORMATA
end if

DTN_FORMATQUERYA        = DTN_FIRST + 5  ; query formatting info for app format field (X)
DTN_FORMATQUERYW        = DTN_FIRST + 18
if UNICODE eq TRUE
    DTN_FORMATQUERY = DTN_FORMATQUERYW
else
    DTN_FORMATQUERY = DTN_FORMATQUERYA
end if

DTN_DROPDOWN            = DTN_FIRST + 6  ; MonthCal has dropped down
DTN_CLOSEUP             = DTN_FIRST + 7  ; MonthCal is popping up
GDTR_MIN                = 0001h
GDTR_MAX                = 0002h
GDT_ERROR               = -1
GDT_VALID               = 0
GDT_NONE                = 1
IPM_CLEARADDRESS        = WM_USER + 100 ; no parameters
IPM_SETADDRESS          = WM_USER + 101 ; lparam = TCP/IP address
IPM_GETADDRESS          = WM_USER + 102 ; lresult = # of non black fields. lparam = LPDWORD for TCP/IP address
IPM_SETRANGE            = WM_USER + 103 ; wparam = field, lparam = range
IPM_SETFOCUS            = WM_USER + 104 ; wparam = field
IPM_ISBLANK             = WM_USER + 105 ; no parameters
IPN_FIELDCHANGED        = IPN_FIRST
PGS_VERT                = 00000000h
PGS_HORZ                = 00000001h
PGS_AUTOSCROLL          = 00000002h
PGS_DRAGNDROP           = 00000004h
PGF_INVISIBLE           = 0      ; Scroll button is not visible
PGF_NORMAL              = 1      ; Scroll button is in normal state
PGF_GRAYED              = 2      ; Scroll button is in grayed state
PGF_DEPRESSED           = 4      ; Scroll button is in depressed state
PGF_HOT                 = 8      ; Scroll button is in hot state
PGB_TOPORLEFT           = 0
PGB_BOTTOMORRIGHT       = 1
PGN_SCROLL              = PGN_FIRST - 1
PGF_SCROLLUP            = 1
PGF_SCROLLDOWN          = 2
PGF_SCROLLLEFT          = 4
PGF_SCROLLRIGHT         = 8
PGK_SHIFT               = 1
PGK_CONTROL             = 2
PGK_MENU                = 4
PGN_CALCSIZE            = PGN_FIRST - 2
PGF_CALCWIDTH           = 1
PGF_CALCHEIGHT          = 2
NFS_EDIT                = 0001h
NFS_STATIC              = 0002h
NFS_LISTCOMBO           = 0004h
NFS_BUTTON              = 0008h
NFS_ALL                 = 0010h
NFS_USEFONTASSOC        = 0020h
TME_NONCLIENT           = 00000010h
WSB_PROP_CYVSCROLL      = 00000001h
WSB_PROP_CXHSCROLL      = 00000002h
WSB_PROP_CYHSCROLL      = 00000004h
WSB_PROP_CXVSCROLL      = 00000008h
WSB_PROP_CXHTHUMB       = 00000010h
WSB_PROP_CYVTHUMB       = 00000020h
WSB_PROP_VBKGCOLOR      = 00000040h
WSB_PROP_HBKGCOLOR      = 00000080h
WSB_PROP_VSTYLE         = 00000100h
WSB_PROP_HSTYLE         = 00000200h
WSB_PROP_WINSTYLE       = 00000400h
WSB_PROP_PALETTE        = 00000800h
WSB_PROP_MASK           = 00000FFFh
FSB_FLAT_MODE           = 2
FSB_ENCARTA_MODE        = 1
FSB_REGULAR_MODE        = 0

; -------------------------------------------------
; DatePicker constants contributed by Edgar Hansen
; -------------------------------------------------
MCM_FIRST               = 4096
MCM_GETCOLOR            = MCM_FIRST + 11
MCM_GETCURSEL           = MCM_FIRST + 1
MCM_GETFIRSTDAYOFWEEK   = MCM_FIRST + 16
MCM_GETMAXSELCOUNT      = MCM_FIRST + 3
MCM_GETMAXTODAYWIDTH    = MCM_FIRST + 21
MCM_GETMINREQRECT       = MCM_FIRST + 9
MCM_GETMONTHDELTA       = MCM_FIRST + 19
MCM_GETMONTHRANGE       = MCM_FIRST + 7
MCM_GETRANGE            = MCM_FIRST + 17
MCM_GETSELRANGE         = MCM_FIRST + 5
MCM_GETTODAY            = MCM_FIRST + 13
MCM_HITTEST             = MCM_FIRST + 14
MCM_SETCOLOR            = MCM_FIRST + 10
MCM_SETCURSEL           = MCM_FIRST + 2
MCM_SETDAYSTATE         = MCM_FIRST + 8
MCM_SETFIRSTDAYOFWEEK   = MCM_FIRST + 15
MCM_SETMAXSELCOUNT      = MCM_FIRST + 4
MCM_SETMONTHDELTA       = MCM_FIRST + 20
MCM_SETRANGE            = MCM_FIRST + 18
MCM_SETSELRANGE         = MCM_FIRST + 6
MCM_SETTODAY            = MCM_FIRST + 12
MCS_DAYSTATE            = 1
MCS_MULTISELECT         = 2
MCS_NOTODAY             = 16
MCS_NOTODAY_PRE_IE4     = 8
MCS_NOTODAYCIRCLE       = 8
MCS_WEEKNUMBERS         = 4

DTM_GETMCCOLOR          = DTM_FIRST + 7
DTM_GETMCFONT           = DTM_FIRST + 10
DTM_GETMONTHCAL         = DTM_FIRST + 8
DTM_GETRANGE            = DTM_FIRST + 3
DTM_SETFORMATA          = DTM_FIRST + 5
DTM_SETFORMATW          = DTM_FIRST + 50

if UNICODE eq TRUE
    DTM_SETFORMAT = DTM_SETFORMATW
else
    DTM_SETFORMAT = DTM_SETFORMATA
end if

DTM_SETMCCOLOR          = DTM_FIRST + 6
DTM_SETMCFONT           = DTM_FIRST + 9
DTM_SETRANGE            = DTM_FIRST + 4
DTS_APPCANPARSE         = 16
DTS_LONGDATEFORMAT      = 4
DTS_RIGHTALIGN          = 32
DTS_SHORTDATEFORMAT     = 0
DTS_SHOWNONE            = 2
DTS_TIMEFORMAT          = 9
DTS_UPDOWN              = 1

; -------------------------------------
; Additional common control structures
; -------------------------------------

NMTOOLTIPSCREATED struct
  hdr               NMHDR  <>
  hwndToolTips      DWORD  ?
NMTOOLTIPSCREATED ends

NMKEY struct
  hdr               NMHDR  <>
  nVKey             DWORD  ?
  uFlags            DWORD  ?
NMKEY ends

_ch fix lh

NMBYTE struct
  hdr               NMHDR  <>
  _ch               DWORD  ?
  dwItemPrev        DWORD  ?
  dwItemNext        DWORD  ?
NMBYTE ends

NMCUSTOMDRAW struct
  hdr               NMHDR  <>
  dwDrawStage       DWORD  ?
  hdc               DWORD  ?
  rc                RECT  <>
  dwItemSpec        DWORD  ?
  uItemState        DWORD  ?
  lItemlParam       DWORD  ?
NMCUSTOMDRAW ends

NMTTCUSTOMDRAW struct
  nmcd              NMCUSTOMDRAW  <>
  uDrawFlags        DWORD  ?
NMTTCUSTOMDRAW ends

_cx fix lx

IMAGELISTDRADWORDS struct
  cbSize            DWORD  ?
  himl              DWORD  ?
  i                 DWORD  ?
  hdcDst            DWORD  ?
  x                 DWORD  ?
  y                 DWORD  ?
  _cx               DWORD  ?
  cy                DWORD  ?
  xBitmap           DWORD  ?
  yBitmap           DWORD  ?
  rgbBk             DWORD  ?
  rgbFg             DWORD  ?
  fStyle            DWORD  ?
  dwRop             DWORD  ?
IMAGELISTDRADWORDS ends

HDITEM struct
   _mask                  DWORD ?
   cxy                    DWORD ?
   pszText                DWORD ?
   hbm                    DWORD ?
   cchTextMax             DWORD ?
   fmt                    DWORD ?
   lParam                 DWORD ?
   iImage                 DWORD ?
   iOrder                 DWORD ?
   _type                  DWORD ?
   pvFilter               DWORD ?
   state                  DWORD ?
HDITEM ends
TYPEDEF LPHDITEM, PVOID

HDHITTESTINFO struct
  pt                POINT  <>
  flags             DWORD  ?
  iItem             DWORD  ?
HDHITTESTINFO ends

NMHDDISPINFO struct
  hdr               NMHDR  <>
  iItem             DWORD  ?
  _mask             DWORD  ?
  pszText           DWORD  ?
  cchTextMax        DWORD  ?
  iImage            DWORD  ?
  lParam            DWORD  ?
NMHDDISPINFO ends

NMHDFILTERBTNCLICK struct
  hdr               NMHDR  <>
  iItem             DWORD  ?
  rc                RECT   <>
NMHDFILTERBTNCLICK ends

TBINSERTMARK struct
  iButton           DWORD  ?
  dwFlags           DWORD  ?
TBINSERTMARK ends

NMTBHOTITEM struct
  hdr               NMHDR  <>
  idOld             DWORD  ?
  idNew             DWORD  ?
  dwFlags           DWORD  ?
NMTBHOTITEM ends

NMTBSAVE struct
  hdr               NMHDR  <>
  pData             DWORD  ?
  pCurrent          DWORD  ?
  cbData            DWORD  ?
  iItem             DWORD  ?
  cButtons          DWORD  ?
  tbButton          TBBUTTON  <>
NMTBSAVE ends

NMTBRESTORE struct
  hdr               NMHDR  <>
  pData             DWORD  ?
  pCurrent          DWORD  ?
  cbData            DWORD  ?
  iItem             DWORD  ?
  cButtons          DWORD  ?
  cbBytesPerRecord  DWORD  ?
  tbButton          TBBUTTON  <>
NMTBRESTORE ends

NMTBGETINFOTIP struct
  hdr               NMHDR  <>
  pszText           DWORD  ?
  cchTextMax        DWORD  ?
  iItem             DWORD  ?
  lParam            DWORD  ?
NMTBGETINFOTIP ends

NMTBDISPINFO struct
  hdr               NMHDR  <>
  dwMask            DWORD  ?
  idCommand         DWORD  ?
  lParam            DWORD  ?
  iImage            DWORD  ?
  pszText           DWORD  ?
  cchText           DWORD  ?
NMTBDISPINFO ends
TYPEDEF LPNMTBDISPINFO, PVOID

NMTOOLBAR struct
  hdr               NMHDR  <>
  iItem             DWORD  ?
  tbButton          TBBUTTON  <>
  cchText           DWORD  ?
  pszText           DWORD  ?
  rcButton          RECT  <>
NMTOOLBAR ends
TYPEDEF TBNOTIFY,  NMTOOLBAR
TYPEDEF LPNMTOOLBAR, PVOID
TYPEDEF LPTBNOTIFY, LPNMTOOLBAR

NMREBARCHEVRON struct
  hdr               NMHDR  <>
  uBand             DWORD  ?
  wID               DWORD  ?
  lParam            DWORD  ?
  rc                RECT   <>
  lParamNM          DWORD  ?
NMREBARCHEVRON ends

TTHITTESTINFO struct
  hwnd              DWORD  ?
  pt                POINT  <>
  ti                TTTOOLINFO  <>
TTHITTESTINFO ends
TYPEDEF LPTTHITTESTINFO, PVOID
TYPEDEF LPHITTESTINFO, LPTTHITTESTINFO

 ; NMUPDOWN struct
 ;   hdr               NMHDR  <>
 ;   iPos              DWORD  ?
 ;   iDelta            DWORD  ?
 ; NMUPDOWN ends

PBRANGE struct
  iLow              DWORD  ?
  iHigh             DWORD  ?
PBRANGE ends

NMITEMACTIVATE struct
  hdr               NMHDR  <>
  iItem             DWORD  ?
  iSubItem          DWORD  ?
  uNewState         DWORD  ?
  uOldState         DWORD  ?
  uChanged          DWORD  ?
  ptAction          POINT  <>
  lParam            DWORD  ?
  uKeyFlags         DWORD  ?
NMITEMACTIVATE ends

NMLVCUSTOMDRAW struct
  nmcd              NMCUSTOMDRAW  <>
  clrText           DWORD  ?
  clrTextBk         DWORD  ?
  iSubItem          DWORD  ?
NMLVCUSTOMDRAW ends

NMLVCACHEHDWORD struct
  hdr               NMHDR  <>
  iFrom             DWORD  ?
  iTo               DWORD  ?
NMLVCACHEHDWORD ends

NMLVFINDITEM struct
    hdr             NMHDR  <>
    iStart          DWORD  ?
    lvfi            LVFINDINFO  <>
NMLVFINDITEM ends
TYPEDEF NM_FINDITEM, NMLVFINDITEM
TYPEDEF LPNMLVFINDITEM, PVOID
TYPEDEF PNM_FINDITEM, LPNMLVFINDITEM
TYPEDEF LPNM_FINDITEM, LPNMLVFINDITEM

NMLVODSTATECHANGE struct
  hdr               NMHDR  <>
  iFrom             DWORD  ?
  iTo               DWORD  ?
  uNewState         DWORD  ?
  uOldState         DWORD  ?
NMLVODSTATECHANGE ends
TYPEDEF NM_ODSTATECHANGE, NMLVODSTATECHANGE
TYPEDEF LPNMLVODSTATECHANGE, PVOID
TYPEDEF PNM_ODSTATECHANGE, LPNMLVODSTATECHANGE
TYPEDEF LPNM_ODSTATECHANGE, LPNMLVODSTATECHANGE

NMLVGETINFOTIP struct
  hdr               NMHDR  <>
  dwFlags           DWORD  ?
  pszText           DWORD  ?
  cchTextMax        DWORD  ?
  iItem             DWORD  ?
  iSubItem          DWORD  ?
  lParam            DWORD  ?
NMLVGETINFOTIP ends
TYPEDEF LPNMLVGETINFOTIP, PVOID

NMTVCUSTOMDRAW struct
  nmcd              NMCUSTOMDRAW  <>
  clrText           DWORD  ?
  clrTextBk         DWORD  ?
  iLevel            DWORD  ?
NMTVCUSTOMDRAW ends

NMTVGETINFOTIP struct
  hdr               NMHDR  <>
  pszText           DWORD  ?
  cchTextMax        DWORD  ?
  hItem             DWORD  ?
  lParam            DWORD  ?
NMTVGETINFOTIP ends

COMBOBOXEXITEM struct
   _mask                  DWORD ?
   iItem                  DWORD ?
   pszText                DWORD ?
   cchTextMax             DWORD ?
   iImage                 DWORD ?
   iSelectedImage         DWORD ?
   iOverlay               DWORD ?
   iIndent                DWORD ?
   lParam                 DWORD ?
COMBOBOXEXITEM ends
TYPEDEF PCOMBOBOXEXITEM, PVOID
TYPEDEF PCCOMBOBOXEXITEM, PCOMBOBOXEXITEM

NMCOMBOBOXEX struct
  hdr               NMHDR  <>
  ceItem            COMBOBOXEXITEM  <>
NMCOMBOBOXEX ends

MCHITTESTINFO struct
  cbSize            DWORD  ?
  pt                POINT  <>
  uHit              DWORD  ?
  _st               SYSTEMTIME  <>
MCHITTESTINFO ends

NMSELCHANGE struct
  nmhdr             NMHDR  <>
  stSelStart        SYSTEMTIME  <>
  stSelEnd          SYSTEMTIME  <>
NMSELCHANGE ends

 ; NMDAYSTATE struct
 ;   nmhdr             NMHDR  <>
 ;   stStart           SYSTEMTIME  <>
 ;   cDayState         DWORD  ?
 ;   prgDayState       LPMONTHDAYSTATE  <>
 ; NMDAYSTATE ends

NMDATETIMECHANGE struct
  nmhdr             NMHDR  <>
  dwFlags           DWORD  ?
  _st               SYSTEMTIME  <>
NMDATETIMECHANGE ends

NMDATETIMESTRING struct
  nmhdr             NMHDR  <>
  pszUserString     DWORD  ?
  _st               SYSTEMTIME  <>
  dwFlags           DWORD  ?
NMDATETIMESTRING ends
TYPEDEF LPNMDATETIMESTRING, PVOID

NMDATETIMEWMKEYDOWN struct
  nmhdr             NMHDR  <>
  nVirtKey          DWORD  ?
  pszFormat         DWORD  ?
  _st               SYSTEMTIME  <>
NMDATETIMEWMKEYDOWN ends
TYPEDEF LPNMDATETIMEWMKEYDOWN, PVOID

NMDATETIMEFORMAT struct
  nmhdr                 NMHDR  <>
  pszFormat             DWORD  ?
  _st                   SYSTEMTIME  <>
  pszDisplay            DWORD  ?
  szDisplay             TCHAR 64 dup(?)
NMDATETIMEFORMAT ends
TYPEDEF LPNMDATETIMEFORMAT, PVOID

SIZE struct
    cx LONG ?
    cy LONG ?
SIZE ends
TYPEDEF PSIZE, PVOID

NMDATETIMEFORMATQUERY struct
    nmhdr       NMHDR <>
    pszFormat   DWORD ?
    szMax       SIZE  <>;naming conflict
NMDATETIMEFORMATQUERY ends
TYPEDEF LPNMDATETIMEFORMATQUERY, PVOID

NMDWORDESS struct
  hdr                   NMHDR  <>
  iField                DWORD  ?
  iValue                DWORD  ?
NMDWORDESS ends

NMPGSCROLL struct
  hdr                   NMHDR  <>
  fwKeys                WORD  ?
  rcParent              RECT  <>
  iDir                  DWORD  ?
  iXpos                 DWORD  ?
  iYpos                 DWORD  ?
  iScroll               DWORD  ?
NMPGSCROLL ends

NMPGCALCSIZE struct
  hdr               NMHDR  <>
  dwFlag            DWORD  ?
  iWidth            DWORD  ?
  iHeight           DWORD  ?
NMPGCALCSIZE ends

TBBUTTONINFO struct
    cbSize      DWORD ?
    dwMask      DWORD ?
    idCommand   DWORD ?
    iImage      DWORD ?
    fsState     BYTE ?
    fsStyle     BYTE ?
    lx          WORD ?
    lParam      DWORD ?
    pszText     DWORD ?
    cchText     DWORD ?
TBBUTTONINFO ends
TYPEDEF LPTBBUTTONINFO, PVOID

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
;                        server 2003 extra equates
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

ICC_STANDARD_CLASSES             = 00004000h
ICC_LINK_CLASS                   = 00008000h
ECM_FIRST                        = 1500h
BCM_FIRST                        = 1600h
CBM_FIRST                        = 1700h
CCM_SETWINDOWTHEME               = (CCM_FIRST + 0Bh)
CCM_DPISCALE                     = (CCM_FIRST + 0Ch)
NM_THEMECHANGED                  = (NM_FIRST-22)
BCN_FIRST                        = (0-1250)
BCN_LAST                         = (0-1350)
CDIS_SHOWKEYBOARDCUES            = 0200h
ILC_MIRROR                       = 00002000h
ILC_PERITEMMIRROR                = 00008000h
ILD_PRESERVEALPHA                = 00001000h
ILD_SCALE                        = 00002000h
ILD_DPISCALE                     = 00004000h
ILS_NORMAL                       = 00000000h
ILS_GLOW                         = 00000001h
ILS_SHADOW                       = 00000002h
ILS_SATURATE                     = 00000004h
ILS_ALPHA                        = 00000008h
ILP_NORMAL                       = 0
ILP_DOWNLEVEL                    = 1
HDS_FLAT                         = 0200h
HDITEM_V1_SIZE                   = sizeof.HDITEM
HDF_SORTUP                       = 0400h
HDF_SORTDOWN                     = 0200h
HHT_ONFILTER                     = 0010h
HHT_ONFILTERBUTTON               = 0020h
HDN_ITEMCHANGEDA                 = (HDN_FIRST-1)
HDN_ITEMCLICKA                   = (HDN_FIRST-2)

TBSTYLE_EX_DOUBLEBUFFER          = 00000080h
TBCDRF_NOBACKGROUND              = 00400000h
TBMF_PAD                         = 00000001h
TBMF_BARPAD                      = 00000002h
TBMF_BUTTONSPACING               = 00000004h
TB_GETMETRICS                    = (WM_USER + 101)
TB_SETMETRICS                    = (WM_USER + 102)
TB_SETWINDOWTHEME                = CCM_SETWINDOWTHEME
HICF_LMOUSE                      = 00000080h
HICF_TOGGLEDROPDOWN              = 00000100h
RBBS_TOPALIGN                    = 00000800h
REBARBANDINFO_V3_SIZE            = sizeof.REBARBANDINFO
RBSTR_CHANGERECT                 = 0001h
RB_GETBANDMARGINS                = (WM_USER + 40)
RB_SETWINDOWTHEME                = CCM_SETWINDOWTHEME
RBN_AUTOBREAK                    = (RBN_FIRST - 22)
RBAB_AUTOSIZE                    = 0001h
RBAB_ADDBAND                     = 0002h
TTTOOLINFO_V1_SIZE               = sizeof.TTTOOLINFO
TTS_CLOSE                        = 80h
TTF_PARSELINKS                   = 1000h
TTM_POPUP                        = (WM_USER + 34)
TTM_GETTITLE                     = (WM_USER + 35)
TTM_SETWINDOWTHEME               = CCM_SETWINDOWTHEME
TTN_LINKCLICK                    = (TTN_FIRST - 3)
NMTTDISPINFO_V1_SIZE             = sizeof.NMTTDISPINFO
TBS_DOWNISLEFT                   = 0400h
LPNM_UPDOWN                      = LPNMUPDOWN
LPNMUPDOWN                       = LPNM_UPDOWN
PBS_MARQUEE                      = 08h
PBM_SETMARQUEE                   = (WM_USER+10)
LVIF_GROUPID                     = 0100h
LVIF_COLUMNS                     = 0200h
LVIS_GLOW                        = 0010h
I_INDENTCALLBACK                 = (-1)
I_GROUPIDCALLBACK                = (-1)
I_GROUPIDNONE                    = (-2)
LVITEM_V1_SIZE                   = sizeof.LVITEM
I_COLUMNSCALLBACK                = (-1)
LVCOLUMN_V1_SIZE                 = sizeof.LVCOLUMN
LVS_EX_BORDERSELECT              = 00008000h
LVS_EX_DOUBLEBUFFER              = 00010000h
LVS_EX_HIDELABELS                = 00020000h
LVS_EX_SINGLEROW                 = 00040000h
LVS_EX_SNAPTOGRID                = 00080000h
LVS_EX_SIMPLESELECT              = 00100000h
LV_MAX_WORKAREAS                 = 16
LVM_SETWORKAREAS                 = (LVM_FIRST + 65)
LVM_GETWORKAREAS                 = (LVM_FIRST + 70)
LVM_GETNUMBEROFWORKAREAS         = (LVM_FIRST + 73)
LVM_SORTITEMSEX                  = (LVM_FIRST + 81)
LVBKIF_FLAG_TILEOFFSET           = 00000100h
LVBKIF_TYPE_WATERMARK            = 10000000h
LVM_SETSELECTEDCOLUMN            = (LVM_FIRST + 140)
LVM_SETTILEWIDTH                 = (LVM_FIRST + 141)
LV_VIEW_ICON                     = 0000h
LV_VIEW_DETAILS                  = 0001h
LV_VIEW_SMALLICON                = 0002h
LV_VIEW_LIST                     = 0003h
LV_VIEW_TILE                     = 0004h
LV_VIEW_MAX                      = 0004h
LVM_SETVIEW                      = (LVM_FIRST + 142)
LVGF_NONE                        = 00000000h
LVGF_HEADER                      = 00000001h
LVGF_FOOTER                      = 00000002h
LVGF_STATE                       = 00000004h
LVGF_ALIGN                       = 00000008h
LVGF_GROUPID                     = 00000010h
LVGS_NORMAL                      = 00000000h
LVGS_COLLAPSED                   = 00000001h
LVGS_HIDDEN                      = 00000002h
LVGA_HEADER_LEFT                 = 00000001h
LVGA_HEADER_CENTER               = 00000002h
LVGA_HEADER_RIGHT                = 00000004h
LVGA_FOOTER_LEFT                 = 00000008h
LVGA_FOOTER_CENTER               = 00000010h
LVGA_FOOTER_RIGHT                = 00000020h
LVM_INSERTGROUP                  = (LVM_FIRST + 145)
LVM_SETGROUPINFO                 = (LVM_FIRST + 147)
LVM_GETGROUPINFO                 = (LVM_FIRST + 149)
LVM_REMOVEGROUP                  = (LVM_FIRST + 150)
LVM_MOVEGROUP                    = (LVM_FIRST + 151)
LVM_MOVEITEMTOGROUP              = (LVM_FIRST + 154)
LVGMF_NONE                       = 00000000h
LVGMF_BORDERSIZE                 = 00000001h
LVGMF_BORDERCOLOR                = 00000002h
LVGMF_TEXTCOLOR                  = 00000004h
LVM_SETGROUPMETRICS              = (LVM_FIRST + 155)
LVM_GETGROUPMETRICS              = (LVM_FIRST + 156)
LVM_ENABLEGROUPVIEW              = (LVM_FIRST + 157)
LVM_SORTGROUPS                   = (LVM_FIRST + 158)
LVM_INSERTGROUPSORTED            = (LVM_FIRST + 159)
LVM_REMOVEALLGROUPS              = (LVM_FIRST + 160)
LVM_HASGROUP                     = (LVM_FIRST + 161)
LVTVIF_AUTOSIZE                  = 00000000h
LVTVIF_FIXEDWIDTH                = 00000001h
LVTVIF_FIXEDHEIGHT               = 00000002h
LVTVIF_FIXEDSIZE                 = 00000003h
LVTVIM_TILESIZE                  = 00000001h
LVTVIM_COLUMNS                   = 00000002h
LVTVIM_LABELMARGIN               = 00000004h
LVM_SETTILEVIEWINFO              = (LVM_FIRST + 162)
LVM_GETTILEVIEWINFO              = (LVM_FIRST + 163)
LVM_SETTILEINFO                  = (LVM_FIRST + 164)
LVM_GETTILEINFO                  = (LVM_FIRST + 165)
LVIM_AFTER                       = 00000001h
LVM_SETINSERTMARK                = (LVM_FIRST + 166)
LVM_GETINSERTMARK                = (LVM_FIRST + 167)
LVM_INSERTMARKHITTEST            = (LVM_FIRST + 168)
LVM_GETINSERTMARKRECT            = (LVM_FIRST + 169)
LVM_SETINSERTMARKCOLOR           = (LVM_FIRST + 170)
LVM_GETINSERTMARKCOLOR           = (LVM_FIRST + 171)
LVM_SETINFOTIP                   = (LVM_FIRST + 173)
LVM_GETSELECTEDCOLUMN            = (LVM_FIRST + 174)
LVM_ISGROUPVIEWENABLED           = (LVM_FIRST + 175)
LVM_GETOUTLINECOLOR              = (LVM_FIRST + 176)
LVM_SETOUTLINECOLOR              = (LVM_FIRST + 177)
LVM_CANCELEDITLABEL              = (LVM_FIRST + 179)
LVM_MAPINDEXTOID                 = (LVM_FIRST + 180)
LVM_MAPIDTOINDEX                 = (LVM_FIRST + 181)
LVCDI_ITEM                       = 00000000h
LVCDI_GROUP                      = 00000001h
LVCDRF_NOSELECT                  = 00010000h
LVCDRF_NOGROUPFRAME              = 00020000h
LVN_BEGINSCROLL                  = (LVN_FIRST-80)
LVN_ENDSCROLL                    = (LVN_FIRST-81)
TVINSERTSTRUCT_V1_SIZE           = sizeof.TVINSERTSTRUCT
TVSI_NOSINGLEEXPAND              = 8000h
TVM_MAPACCIDTOHTREEITEM          = (TV_FIRST + 42)
TVM_MAPHTREEITEMTOACCID          = (TV_FIRST + 43)
CBEM_SETWINDOWTHEME              = CCM_SETWINDOWTHEME
;NMCBEDRAGBEGIN                   = NMCBEDRAGBEGINA
;LPNMCBEDRAGBEGIN                 = LPNMCBEDRAGBEGINA
;PNMCBEDRAGBEGIN                  = PNMCBEDRAGBEGINA
;NMCBEENDEDIT                     = NMCBEENDEDITA
;LPNMCBEENDEDIT                   = LPNMCBEENDEDITA
;PNMCBEENDEDIT                    = PNMCBEENDEDITA
;WC_PAGESCROLLER                  = WC_PAGESCROLLER
PGM_SETCHILD                     = (PGM_FIRST + 1)
PGM_RECALCSIZE                   = (PGM_FIRST + 2)
PGM_FORWARDMOUSE                 = (PGM_FIRST + 3)
PGM_SETBKCOLOR                   = (PGM_FIRST + 4)
PGM_GETBKCOLOR                   = (PGM_FIRST + 5)
PGM_SETBORDER                    = (PGM_FIRST + 6)
PGM_GETBORDER                    = (PGM_FIRST + 7)
PGM_SETPOS                       = (PGM_FIRST + 8)
PGM_GETPOS                       = (PGM_FIRST + 9)
PGM_SETBUTTONSIZE                = (PGM_FIRST + 10)
PGM_GETBUTTONSIZE                = (PGM_FIRST + 11)
PGM_GETBUTTONSTATE               = (PGM_FIRST + 12)
PGM_GETDROPTARGET                = CCM_GETDROPTARGET
PGN_HOTITEMCHANGE                = (PGN_FIRST-3)
BUTTON_IMAGELIST_ALIGN_LEFT      = 0
BUTTON_IMAGELIST_ALIGN_RIGHT     = 1
BUTTON_IMAGELIST_ALIGN_TOP       = 2
BUTTON_IMAGELIST_ALIGN_BOTTOM    = 3
BUTTON_IMAGELIST_ALIGN_CENTER    = 4
BCM_GETIDEALSIZE                 = (BCM_FIRST + 0001h)
BCM_SETIMAGELIST                 = (BCM_FIRST + 0002h)
BCM_GETIMAGELIST                 = (BCM_FIRST + 0003h)
BCM_SETTEXTMARGIN                = (BCM_FIRST + 0004h)
BCM_GETTEXTMARGIN                = (BCM_FIRST + 0005h)
BCN_HOTITEMCHANGE                = (BCN_FIRST + 0001h)
BST_HOT                          = 0200h
EM_SETCUEBANNER                  = (ECM_FIRST + 1)
EM_GETCUEBANNER                  = (ECM_FIRST + 2)
EM_SHOWBALLOONTIP                = (ECM_FIRST + 3)
EM_HIDEBALLOONTIP                = (ECM_FIRST + 4)
CB_SETMINVISIBLE                 = (CBM_FIRST + 1)
CB_GETMINVISIBLE                 = (CBM_FIRST + 2)
INVALID_LINK_INDEX               = (-1)
MAX_LINKID_TEXT                  = 48
LWS_TRANSPARENT                  = 0001h
LWS_IGNORERETURN                 = 0002h
LIF_ITEMINDEX                    = 00000001h
LIF_STATE                        = 00000002h
LIF_ITEMID                       = 00000004h
LIF_URL                          = 00000008h
LIS_FOCUSED                      = 00000001h
LIS_ENABLED                      = 00000002h
LIS_VISITED                      = 00000004h
LM_HITTEST                       = (WM_USER+300h)
LM_GETIDEALHEIGHT                = (WM_USER+301h)
LM_SETITEM                       = (WM_USER+302h)
LM_GETITEM                       = (WM_USER+303h)
DA_LAST                          = (7FFFFFFFh)
DPA_APPEND                       = (7fffffffh)
DPA_ERR                          = (-1)
DSA_APPEND                       = (7fffffffh)
DSA_ERR                          = (-1)
DPAS_SORTED                      = 0001h
DPAS_INSERTBEFORE                = 0002h
DPAS_INSERTAFTER                 = 0004h

TB_SETINDENT                     = WM_USER + 47
TB_SETIMAGELIST                  = WM_USER + 48
TB_GETIMAGELIST                  = WM_USER + 49
TB_LOADIMAGES                    = WM_USER + 50
TB_GETRECT                       = WM_USER + 51
TB_SETHOTIMAGELIST               = WM_USER + 52
TB_GETHOTIMAGELIST               = WM_USER + 53
TB_SETDISABLEDIMAGELIST          = WM_USER + 54
TB_GETDISABLEDIMAGELIST          = WM_USER + 55
TB_GETBUTTONSIZE                 = WM_USER + 58
TB_SETBUTTONWIDTH                = WM_USER + 59
TB_SETMAXTEXTROWS                = WM_USER + 60
TB_GETTEXTROWS                   = WM_USER + 61
TB_GETOBJECT                     = WM_USER + 62
TB_GETHOTITEM                    = WM_USER + 71
TB_SETHOTITEM                    = WM_USER + 72
TB_SETANCHORHIGHLIGHT            = WM_USER + 73
TB_GETANCHORHIGHLIGHT            = WM_USER + 74
TB_MAPACCELERATORA               = WM_USER + 78
TB_MAPACCELERATORW               = WM_USER + 90
if UNICODE eq TRUE
    TB_MAPACCELERATOR = TB_MAPACCELERATORW
else
    TB_MAPACCELERATOR = TB_MAPACCELERATORA
end if

LVS_EX_GRIDLINES                 = 00000001h
LVS_EX_SUBITEMIMAGES             = 00000002h
LVS_EX_CHECKBOXES                = 00000004h
LVS_EX_TRACKSELECT               = 00000008h
LVS_EX_HEADERDRAGDROP            = 00000010h
LVS_EX_FULLROWSELECT             = 00000020h
LVS_EX_ONECLICKACTIVATE          = 00000040h
LVS_EX_TWOCLICKACTIVATE          = 00000080h
LVS_EX_FLATSB                    = 00000100h
LVS_EX_REGIONAL                  = 00000200h
LVS_EX_INFOTIP                   = 00000400h
LVS_EX_UNDERLINEHOT              = 00000800h
LVS_EX_UNDERLINECOLD             = 00001000h
LVS_EX_MULTIWORKAREAS            = 00002000h
LVS_EX_LABELTIP                  = 00004000h

LVCF_IMAGE                       = 0010h
LVCF_ORDER                       = 0020h
LVCFMT_IMAGE                     = 0800h
LVCFMT_BITMAP_ON_RIGHT           = 1000h
LVCFMT_COL_HAS_IMAGES            = 8000h

LVM_GETHEADER                    = LVM_FIRST + 31
LVM_SETEXTENDEDLISTVIEWSTYLE     = LVM_FIRST + 54
LVM_GETEXTENDEDLISTVIEWSTYLE     = LVM_FIRST + 55

HDM_SETIMAGELIST                 = HDM_FIRST + 8
HDM_GETIMAGELIST                 = HDM_FIRST + 9

CDRF_DOERASE                     = 00000008h
CDRF_SKIPPOSTPAINT               = 00000100h
CDIS_NEARHOT                     = 0400h
CDIS_OTHERSIDEHOT                = 0800h
CDIS_DROPHILITED                 = 1000h
ILC_ORIGINALSIZE                 = 00010000h
ILC_HIGHQUALITYSCALE             = 00020000h
ILD_ASYNC                        = 00008000h
ILGT_NORMAL                      = 00000000h
ILGT_ASYNC                       = 00000001h
HDS_CHECKBOXES                   = 0400h
HDS_NOSIZING                     = 0800h
HDS_OVERFLOW                     = 1000h
HDFT_ISDATE                      = 0002h
HDI_STATE                        = 0200h
HDF_CHECKBOX                     = 0040h
HDF_CHECKED                      = 0080h
HDF_FIXEDWIDTH                   = 0100h
HDF_SPLITBUTTON                  = 1000000h
HDIS_FOCUSED                     = 00000001h
HHT_ONITEMSTATEICON              = 1000h
HHT_ONDROPDOWN                   = 2000h
HHT_ONOVERFLOW                   = 4000h
HDSIL_NORMAL                     = 0
HDSIL_STATE                      = 1
;HDM_TRANSLATEACCELERATOR         = CCM_TRANSLATEACCELERATOR
HDM_GETITEMDROPDOWNRECT          = HDM_FIRST+25
HDM_GETOVERFLOWRECT              = HDM_FIRST+26
HDM_GETFOCUSEDITEM               = HDM_FIRST+27
HDM_SETFOCUSEDITEM               = HDM_FIRST+28
HDN_BEGINFILTEREDIT              = HDN_FIRST-14
HDN_ENDFILTEREDIT                = HDN_FIRST-15
HDN_ITEMSTATEICONCLICK           = HDN_FIRST-16
HDN_ITEMKEYDOWN                  = HDN_FIRST-17
HDN_DROPDOWN                     = HDN_FIRST-18
HDN_OVERFLOWCLICK                = HDN_FIRST-19
TBCDRF_USECDCOLORS               = 00800000h
IDB_HIST_NORMAL                  = 12
IDB_HIST_HOT                     = 13
IDB_HIST_DISABLED                = 14
IDB_HIST_PRESSED                 = 15
TB_SETPRESSEDIMAGELIST           = WM_USER + 104
TB_GETPRESSEDIMAGELIST           = WM_USER + 105
RBBIM_CHEVRONLOCATION            = 00001000h
RBBIM_CHEVRONSTATE               = 00002000h
RB_SETEXTENDEDSTYLE              = WM_USER + 41
RB_GETEXTENDEDSTYLE              = WM_USER + 42
RB_SETBANDWIDTH                  = WM_USER + 44
RBN_SPLITTERDRAG                 = RBN_FIRST - 11
RBHT_SPLITTER                    = 0010h
TTS_USEVISUALSTYLE               = 100h
TTI_INFO_LARGE                   = 4
TTI_WARNING_LARGE                = 5
TTI_ERROR_LARGE                  = 6
TTM_UPDATE                       = WM_USER + 29
TBS_NOTIFYBEFOREMOVE             = 0800h
TBS_TRANSPARENTBKGND             = 1000h
PBS_SMOOTHREVERSE                = 10h
PBM_GETSTEP                      = WM_USER+13
PBM_GETBKCOLOR                   = WM_USER+14
PBM_GETBARCOLOR                  = WM_USER+15
PBM_SETSTATE                     = WM_USER+16
PBM_GETSTATE                     = WM_USER+17
PBST_NORMAL                      = 0001h
PBST_ERROR                       = 0002h
PBST_PAUSED                      = 0003h
LWS_NOPREFIX                     = 0004h
LWS_USEVISUALSTYLE               = 0008h
LWS_USECUSTOMTEXT                = 0010h
LWS_RIGHT                        = 0020h
LIS_HOTTRACK                     = 00000008h
LIS_DEFAULTCOLORS                = 00000010h
LVSIL_GROUPHEADER                = 3
LVIF_COLFMT                      = 00010000h
LVNI_VISIBLEORDER                = 0010h
LVNI_PREVIOUS                    = 0020h
LVNI_VISIBLEONLY                 = 0040h
LVNI_SAMEGROUPONLY               = 0080h
LVNI_DIRECTIONMASK               = LVNI_ABOVE or LVNI_BELOW or LVNI_TOLEFT or LVNI_TORIGHT
LVFI_SUBSTRING                   = 0004h
LVHT_EX_GROUP_HEADER             = 10000000h
LVHT_EX_GROUP_FOOTER             = 20000000h
LVHT_EX_GROUP_COLLAPSE           = 40000000h
LVHT_EX_GROUP_BACKGROUND         = 80000000h
LVHT_EX_GROUP_STATEICON          = 01000000h
LVHT_EX_GROUP_SUBSETLINK         = 02000000h
LVHT_EX_GROUP                    = LVHT_EX_GROUP_BACKGROUND or LVHT_EX_GROUP_COLLAPSE or LVHT_EX_GROUP_FOOTER or LVHT_EX_GROUP_HEADER or LVHT_EX_GROUP_STATEICON or LVHT_EX_GROUP_SUBSETLINK
LVHT_EX_ONCONTENTS               = 04000000h
LVHT_EX_FOOTER                   = 08000000h
LVCF_MINWIDTH                    = 0040h
LVCF_DEFAULTWIDTH                = 0080h
LVCF_IDEALWIDTH                  = 0100h
LVCFMT_FIXED_WIDTH               = 00100h
LVCFMT_NO_DPI_SCALE              = 40000h
LVCFMT_FIXED_RATIO               = 80000h
LVCFMT_LINE_BREAK                = 100000h
LVCFMT_FILL                      = 200000h
LVCFMT_WRAP                      = 400000h
LVCFMT_NO_TITLE                  = 800000h
LVCFMT_TILE_PLACEMENTMASK        = LVCFMT_LINE_BREAK or LVCFMT_FILL
LVCFMT_SPLITBUTTON               = 1000000h
LVS_EX_JUSTIFYCOLUMNS            = 00200000h
LVS_EX_TRANSPARENTBKGND          = 00400000h
LVS_EX_TRANSPARENTSHADOWTEXT     = 00800000h
LVS_EX_AUTOAUTOARRANGE           = 01000000h
LVS_EX_HEADERINALLVIEWS          = 02000000h
LVS_EX_AUTOCHECKSELECT           = 08000000h
LVS_EX_AUTOSIZECOLUMNS           = 10000000h
LVS_EX_COLUMNSNAPPOINTS          = 40000000h
LVS_EX_COLUMNOVERFLOW            = 80000000h
LVBKIF_FLAG_ALPHABLEND           = 20000000h
LVM_GETVIEW                      = LVM_FIRST + 143
LVGF_SUBTITLE                    = 00000100h
LVGF_TASK                        = 00000200h
LVGF_DESCRIPTIONTOP              = 00000400h
LVGF_DESCRIPTIONBOTTOM           = 00000800h
LVGF_TITLEIMAGE                  = 00001000h
LVGF_EXTENDEDIMAGE               = 00002000h
LVGF_ITEMS                       = 00004000h
LVGF_SUBSET                      = 00008000h
LVGF_SUBSETITEMS                 = 00010000h
LVGS_NOHEADER                    = 00000004h
LVGS_COLLAPSIBLE                 = 00000008h
LVGS_FOCUSED                     = 00000010h
LVGS_SELECTED                    = 00000020h
LVGS_SUBSETED                    = 00000040h
LVGS_SUBSETLINKFOCUSED           = 00000080h
LVM_GETGROUPCOUNT                = LVM_FIRST + 152
LVM_GETGROUPINFOBYINDEX          = LVM_FIRST + 153
LVGGR_GROUP                      = 0
LVGGR_HEADER                     = 1
LVGGR_LABEL                      = 2
LVGGR_SUBSETLINK                 = 3
LVM_GETGROUPRECT                 = LVM_FIRST + 98
LVM_GETGROUPSTATE                = LVM_FIRST + 92
LVM_GETFOCUSEDGROUP              = LVM_FIRST + 93
LVTVIF_EXTENDED                  = 00000004h
LVM_ISITEMVISIBLE                = LVM_FIRST + 182
LVM_GETEMPTYTEXT                 = LVM_FIRST + 204
LVM_GETFOOTERRECT                = LVM_FIRST + 205
LVFF_ITEMCOUNT                   = 00000001h
LVM_GETFOOTERINFO                = LVM_FIRST + 206
LVM_GETFOOTERITEMRECT            = LVM_FIRST + 207
LVFIF_TEXT                       = 00000001h
LVFIF_STATE                      = 00000002h
LVFIS_FOCUSED                    = 0001h
LVM_GETFOOTERITEM                = LVM_FIRST + 208
LVM_GETITEMINDEXRECT             = LVM_FIRST + 209
LVM_SETITEMINDEXSTATE            = LVM_FIRST + 210
LVM_GETNEXTITEMINDEX             = LVM_FIRST + 211
LVNSCH_DEFAULT                   = -1
LVNSCH_ERROR                     = -2
LVNSCH_IGNORE                    = -3
LVN_INCREMENTALSEARCHA           = LVN_FIRST-62
LVN_INCREMENTALSEARCHW           = LVN_FIRST-63
if UNICODE eq TRUE
    LVN_INCREMENTALSEARCH = LVN_INCREMENTALSEARCHW
else
    LVN_INCREMENTALSEARCH = LVN_INCREMENTALSEARCHA
end if

LVN_COLUMNDROPDOWN               = LVN_FIRST-64
LVN_COLUMNOVERFLOWCLICK          = LVN_FIRST-66
LVN_LINKCLICK                    = LVN_FIRST-84
EMF_CENTERED                     = 00000001h
TVS_EX_MULTISELECT               = 0002h
TVS_EX_DOUBLEBUFFER              = 0004h
TVS_EX_NOINDENTSTATE             = 0008h
TVS_EX_RICHTOOLTIP               = 0010h
TVS_EX_AUTOHSCROLL               = 0020h
TVS_EX_FADEINOUTEXPANDOS         = 0040h
TVS_EX_PARTIALCHECKBOXES         = 0080h
TVS_EX_EXCLUSIONCHECKBOXES       = 0100h
TVS_EX_DIMMEDCHECKBOXES          = 0200h
TVS_EX_DRAWIMAGEASYNC            = 0400h
TVIF_STATEEX                     = 0100h
TVIF_EXPANDEDIMAGE               = 0200h
TVIS_EX_FLAT                     = 0001h
TVIS_EX_DISABLED                 = 0002h
TVIS_EX_ALL                      = 0002h
TVGN_NEXTSELECTED                = 000Bh
TVM_SETEXTENDEDSTYLE             = TV_FIRST + 44
TVM_GETEXTENDEDSTYLE             = TV_FIRST + 45
TVM_SETAUTOSCROLLINFO            = TV_FIRST + 59
TVM_GETSELECTEDCOUNT             = TV_FIRST + 70
TVM_SHOWINFOTIP                  = TV_FIRST + 71
TVM_GETITEMPARTRECT              = TV_FIRST + 72
TVN_ITEMCHANGINGA                = TVN_FIRST-16
TVN_ITEMCHANGINGW                = TVN_FIRST-17
if UNICODE eq TRUE
    TVN_ITEMCHANGING = TVN_ITEMCHANGINGW
else
    TVN_ITEMCHANGING = TVN_ITEMCHANGINGA
end if

TVN_ITEMCHANGEDA                 = TVN_FIRST-18
TVN_ITEMCHANGEDW                 = TVN_FIRST-19
if UNICODE eq TRUE
    TVN_ITEMCHANGED = TVN_ITEMCHANGEDW
else
    TVN_ITEMCHANGED = TVN_ITEMCHANGEDA
end if

TVN_ASYNCDRAW                    = TVN_FIRST-20
CBES_EX_TEXTENDELLIPSIS          = 00000020h
TCS_RIGHT                        = 0002h
MCHT_CALENDARCONTROL             = 00100000h
MCHT_CALENDARDATEMIN             = MCHT_CALENDAR or 0004h
MCHT_CALENDARDATEMAX             = MCHT_CALENDAR or 0005h
MCMV_MONTH                       = 0
MCMV_YEAR                        = 1
MCMV_DECADE                      = 2
MCMV_CENTURY                     = 3
MCMV_MAX                         = MCMV_CENTURY
MCM_GETCURRENTVIEW               = MCM_FIRST + 22
MCM_GETCALENDARCOUNT             = MCM_FIRST + 23
MCGIP_CALENDARCONTROL            = 0
MCGIP_NEXT                       = 1
MCGIP_PREV                       = 2
MCGIP_FOOTER                     = 3
MCGIP_CALENDAR                   = 4
MCGIP_CALENDARHEADER             = 5
MCGIP_CALENDARBODY               = 6
MCGIP_CALENDARROW                = 7
MCGIP_CALENDARCELL               = 8
MCGIF_DATE                       = 00000001h
MCGIF_RECT                       = 00000002h
MCGIF_NAME                       = 00000004h
MCM_GETCALENDARGRIDINFO          = MCM_FIRST + 24
MCM_GETCALID                     = MCM_FIRST + 27
MCM_SETCALID                     = MCM_FIRST + 28
MCM_SIZERECTTOMIN                = MCM_FIRST + 29
MCM_SETCALENDARBORDER            = MCM_FIRST + 30
MCM_GETCALENDARBORDER            = MCM_FIRST + 31
MCM_SETCURRENTVIEW               = MCM_FIRST + 32
MCN_VIEWCHANGE                   = MCN_FIRST - 4
MCS_NOTRAILINGDATES              = 0040h
MCS_SHORTDAYSOFWEEK              = 0080h
MCS_NOSELCHANGEONNAV             = 0100h
DTM_SETMCSTYLE                   = DTM_FIRST + 11
DTM_GETMCSTYLE                   = DTM_FIRST + 12
DTM_CLOSEMONTHCAL                = DTM_FIRST + 13
DTM_GETDATETIMEPICKERINFO        = DTM_FIRST + 14
DTM_GETIDEALSIZE                 = DTM_FIRST + 15
BST_DROPDOWNPUSHED               = 0400h
BS_SPLITBUTTON                   = 0000000Ch
BS_DEFSPLITBUTTON                = 0000000Dh
BS_COMMANDLINK                   = 0000000Eh
BS_DEFCOMMANDLINK                = 0000000Fh
BCSIF_GLYPH                      = 0001h
BCSIF_IMAGE                      = 0002h
BCSIF_STYLE                      = 0004h
BCSIF_SIZE                       = 0008h
BCSS_NOSPLIT                     = 0001h
BCSS_STRETCH                     = 0002h
BCSS_ALIGNLEFT                   = 0004h
BCSS_IMAGE                       = 0008h
BCM_SETDROPDOWNSTATE             = BCM_FIRST + 0006h
BCM_SETSPLITINFO                 = BCM_FIRST + 0007h
BCM_GETSPLITINFO                 = BCM_FIRST + 0008h
BCM_SETNOTE                      = BCM_FIRST + 0009h
BCM_GETNOTE                      = BCM_FIRST + 000Ah
BCM_GETNOTELENGTH                = BCM_FIRST + 000Bh
BCM_SETSHIELD                    = BCM_FIRST + 000Ch
BCCL_NOGLYPH                     = -1
BCN_DROPDOWN                     = BCN_FIRST + 0002h
DA_ERR                           = -1
DPAM_SORTED                      = 00000001h
DPAM_NORMAL                      = 00000002h
DPAM_UNION                       = 00000004h
DPAM_INTERSECT                   = 00000008h
DPAMM_MERGE                      = 1
DPAMM_DELETE                     = 2
DPAMM_INSERT                     = 3

; Extra structures

NMOBJECTNOTIFY struct
   hdr                    NMHDR <>
   iItem                  DWORD ?
   piid                   DWORD ?
   pObject                DWORD ?
   hResult                DWORD ?
   dwFlags                DWORD ?
NMOBJECTNOTIFY ends

NMCHAR struct
   hdr                    NMHDR <>
   _ch                    DWORD ?
   dwItemPrev             DWORD ?
   dwItemNext             DWORD ?
NMCHAR ends

NMCUSTOMTEXT struct
   hdr                    NMHDR <>
   hDC                    DWORD ?
   lpString               DWORD ?
   nCount                 DWORD ?
   lpRect                 RECT <>
   uFormat                DWORD ?
   fLink                  DWORD ?
NMCUSTOMTEXT ends

NMCUSTOMSPLITRECTINFO struct
   hdr                    NMHDR <>
   rcClient               RECT <>
   rcButton               RECT <>
   rcSplit                RECT <>
NMCUSTOMSPLITRECTINFO ends

IMAGELISTDRAWPARAMS struct
   cbSize                 DWORD ?
   himl                   DWORD ?
   i                      DWORD ?
   hdcDst                 DWORD ?
   x                      DWORD ?
   y                      DWORD ?
   _cx                    DWORD ?
   cy                     DWORD ?
   xBitmap                DWORD ?
   yBitmap                DWORD ?
   rgbBk                  DWORD ?
   rgbFg                  DWORD ?
   fStyle                 DWORD ?
   dwRop                  DWORD ?
   fState                 DWORD ?
   Frame                  DWORD ?
   crEffect               DWORD ?
IMAGELISTDRAWPARAMS ends

HD_TEXTFILTER struct
   pszText                DWORD ?
   cchTextMax             DWORD ?
HD_TEXTFILTER ends
TYPEDEF LPHD_TEXTFILTER, PVOID
TYPEDEF LPHDTEXTFILTER, LPHD_TEXTFILTER

HDLAYOUT struct
   prc                    DWORD ?
   pwpos                  DWORD ?
HDLAYOUT ends

NMTBCUSTOMDRAW struct
   nmcd                   NMCUSTOMDRAW <>
   hbrMonoDither          DWORD ?
   hbrLines               DWORD ?
   hpenLines              DWORD ?
   clrText                DWORD ?
   clrMark                DWORD ?
   clrTextHighlight       DWORD ?
   clrBtnFace             DWORD ?
   clrBtnHighlight        DWORD ?
   clrHighlightHotTrack   DWORD ?
   rcText                 RECT <>
   nStringBkMode          DWORD ?
   nHLStringBkMode        DWORD ?
   iListGap               DWORD ?
NMTBCUSTOMDRAW ends

TBMETRICS struct
   cbSize                 DWORD ?
   dwMask                 DWORD ?
   cxPad                  DWORD ?
   cyPad                  DWORD ?
   cxBarPad               DWORD ?
   cyBarPad               DWORD ?
   cxButtonSpacing        DWORD ?
   cyButtonSpacing        DWORD ?
TBMETRICS ends

NMREBARSPLITTER struct
   hdr                    NMHDR <>
   rcSizing               RECT <>
NMREBARSPLITTER ends

NMREBARAUTOBREAK struct
   hdr                    NMHDR <>
   uBand                  DWORD ?
   wID                    DWORD ?
   lParam                 DWORD ?
   uMsg                   DWORD ?
   fStyleCurrent          DWORD ?
   fAutoBreak             DWORD ?
NMREBARAUTOBREAK ends

TTGETTITLE struct
   dwSize                 DWORD ?
   uTitleBitmap           DWORD ?
   cch                    DWORD ?
   pszTitle               DWORD ?
TTGETTITLE ends

NMTRBTHUMBPOSCHANGING struct
   hdr                    NMHDR <>
   dwPos                  DWORD ?
   nReason                DWORD ?
NMTRBTHUMBPOSCHANGING ends

LVBKIMAGE struct
   ulFlags                DWORD ?
   hbm                    DWORD ?
   pszImage               DWORD ?
   cchImageMax            DWORD ?
   xOffsetPercent         DWORD ?
   yOffsetPercent         DWORD ?
LVBKIMAGE ends
TYPEDEF LPLVBKIMAGE, PVOID

LVGROUP struct
   cbSize                 DWORD ?
   _mask                  DWORD ?
   pszHeader              DWORD ?
   cchHeader              DWORD ?
   pszFooter              DWORD ?
   cchFooter              DWORD ?
   iGroupId               DWORD ?
   stateMask              DWORD ?
   state                  DWORD ?
   uAlign                 DWORD ?
   pszSubtitle            DWORD ?
   cchSubtitle            DWORD ?
   pszTask                DWORD ?
   cchTask                DWORD ?
   pszDescriptionTop      DWORD ?
   cchDescriptionTop      DWORD ?
   pszDescriptionBottom   DWORD ?
   cchDescriptionBottom   DWORD ?
   iTitleImage            DWORD ?
   iExtendedImage         DWORD ?
   iFirstItem             DWORD ?
   cItems                 DWORD ?
   pszSubsetTitle         DWORD ?
   cchSubsetTitle         DWORD ?
LVGROUP ends

LVGROUPMETRICS struct
   cbSize                 DWORD ?
   _mask                  DWORD ?
   Left                   DWORD ?
   Top                    DWORD ?
   Right                  DWORD ?
   Bottom                 DWORD ?
   crLeft                 DWORD ?
   crTop                  DWORD ?
   crRight                DWORD ?
   crBottom               DWORD ?
   crHeader               DWORD ?
   crFooter               DWORD ?
LVGROUPMETRICS ends

LVTILEINFO struct
   cbSize                 DWORD ?
   iItem                  DWORD ?
   cColumns               DWORD ?
   puColumns              DWORD ?
   piColFmt               DWORD ?
LVTILEINFO ends

LVINSERTMARK struct
   cbSize                 DWORD ?
   dwFlags                DWORD ?
   iItem                  DWORD ?
   dwReserved             DWORD ?
LVINSERTMARK ends

LVSETINFOTIP struct
   cbSize                 DWORD ?
   dwFlags                DWORD ?
   pszText                DWORD ?
   iItem                  DWORD ?
   iSubItem               DWORD ?
LVSETINFOTIP ends

LVFOOTERINFO struct
   _mask                  DWORD ?
   pszText                DWORD ?
   cchTextMax             DWORD ?
   cItems                 DWORD ?
LVFOOTERINFO ends

LVFOOTERITEM struct
   _mask                  DWORD ?
   iItem                  DWORD ?
   pszText                DWORD ?
   cchTextMax             DWORD ?
   state                  DWORD ?
   stateMask              DWORD ?
LVFOOTERITEM ends

LVITEMINDEX struct
   iItem                  DWORD ?
   iGroup                 DWORD ?
LVITEMINDEX ends

NMLVCACHEHINT struct
   hdr                    NMHDR <>
   iFrom                  DWORD ?
   iTo                    DWORD ?
NMLVCACHEHINT ends
TYPEDEF NM_CACHEHINT, NMLVCACHEHINT
TYPEDEF LPNMLVCACHEHINT, PVOID
TYPEDEF LPNM_CACHEHINT, LPNMLVCACHEHINT
TYPEDEF PNM_CACHEHINT, LPNMLVCACHEHINT

NMLVSCROLL struct
   hdr                    NMHDR <>
   _dx                    DWORD ?
   dy                     DWORD ?
NMLVSCROLL ends

TVITEMEXA struct
   _mask                  DWORD ?
   hItem                  DWORD ?
   state                  DWORD ?
   stateMask              DWORD ?
   pszText                DWORD ?
   cchTextMax             DWORD ?
   iImage                 DWORD ?
   iSelectedImage         DWORD ?
   cChildren              DWORD ?
   lParam                 DWORD ?
   iIntegral              DWORD ?
   uStateEx               DWORD ?
   hwnd                   DWORD ?
   iExpandedImage         DWORD ?
TVITEMEXA ends

TVITEMEXW struct
   _mask                  DWORD ?
   hItem                  DWORD ?
   state                  DWORD ?
   stateMask              DWORD ?
   pszText                DWORD ?
   cchTextMax             DWORD ?
   iImage                 DWORD ?
   iSelectedImage         DWORD ?
   cChildren              DWORD ?
   lParam                 DWORD ?
   iIntegral              DWORD ?
   uStateEx               DWORD ?
   hwnd                   DWORD ?
   iExpandedImage         DWORD ?
TVITEMEXW ends

NMTVDISPINFOEXA struct
   hdr                    NMHDR <>
   item                   TVITEMEXA <>
NMTVDISPINFOEXA ends

NMTVDISPINFOEXW struct
   hdr                    NMHDR <>
   item                   TVITEMEXW <>
NMTVDISPINFOEXW ends

NMTVITEMCHANGE struct
   hdr                    NMHDR <>
   uChanged               DWORD ?
   hItem                  DWORD ?
   uStateNew              DWORD ?
   uStateOld              DWORD ?
   lParam                 DWORD ?
NMTVITEMCHANGE ends

NMVIEWCHANGE struct
   nmhdr                  NMHDR <>
   dwOldView              DWORD ?
   dwNewView              DWORD ?
NMVIEWCHANGE ends

DATETIMEPICKERINFO struct
   cbSize                 DWORD ?
   rcCheck                RECT <>
   stateCheck             DWORD ?
   rcButton               RECT <>
   stateButton            DWORD ?
   hwndEdit               DWORD ?
   hwndUD                 DWORD ?
   hwndDropDown           DWORD ?
DATETIMEPICKERINFO ends

NMIPADDRESS struct
   hdr                    NMHDR <>
   iField                 DWORD ?
   iValue                 DWORD ?
NMIPADDRESS ends

NMPGHOTITEM struct
   hdr                    NMHDR <>
   idOld                  DWORD ?
   idNew                  DWORD ?
   dwFlags                DWORD ?
NMPGHOTITEM ends

BUTTON_IMAGELIST struct
   himl                   DWORD ?
   margin                 RECT <>
   uAlign                 DWORD ?
BUTTON_IMAGELIST ends

NMBCHOTITEM struct
   hdr                    NMHDR <>
   dwFlags                DWORD ?
NMBCHOTITEM ends

NMBCDROPDOWN struct
   hdr                    NMHDR <>
   rcButton               RECT <>
NMBCDROPDOWN ends

EDITBALLOONTIP struct
   cbStruct               DWORD ?
   pszTitle               DWORD ?
   pszText                DWORD ?
   ttiIcon                DWORD ?
EDITBALLOONTIP ends

TASKDIALOG_BUTTON struct
   nButtonID              DWORD ?
   pszButtonText          DWORD ?
TASKDIALOG_BUTTON ends

DPASTREAMINFO struct
   iPos                   DWORD ?
   pvItem                 DWORD ?
DPASTREAMINFO ends


;;;; end comctl

;;;; wsock

;-------------------------- wsock32 equates -------------------------------

WSADESCRIPTION_LEN          = 256
WSASYS_STATUS_LEN           = 128
IPPROTO_IP          =             0
IPPROTO_ICMP          =           1
IPPROTO_GGP          =            2
IPPROTO_TCP          =            6
IPPROTO_PUP          =            12
IPPROTO_UDP          =            17
IPPROTO_IDP          =            22
IPPROTO_ND          =             77
IPPROTO_RAW          =            255
IPPROTO_MAX          =            256
IOCPARM_MASK           = 7Fh
IOC_VOID               = 20000000h
IOC_OUT                = 40000000h
IOC_IN = 80000000h
IOC_INOUT              = IOC_IN or IOC_OUT
FIONBIO                = 8004667Eh
FIONSYNC               = 8004667Dh
FIONREAD               = 4004667Fh
IPPORT_ECHO          =            7
IPPORT_DISCARD          =         9
IPPORT_SYSTAT          =          11
IPPORT_DAYTIME          =         13
IPPORT_NETSTAT          =         15
IPPORT_FTP          =             21
IPPORT_TELNET          =          23
IPPORT_SMTP          =            25
IPPORT_TIMESERVER          =      37
IPPORT_NAMESERVER          =      42
IPPORT_WHOIS          =           43
IPPORT_MTP          =             57
IPPORT_TFTP          =            69
IPPORT_RJE          =             77
IPPORT_FINGER          =          79
IPPORT_TTYLINK          =         87
IPPORT_SUPDUP          =          95
IPPORT_EXECSERVER          =      512
IPPORT_LOGINSERVER          =     513
IPPORT_CMDSERVER          =       514
IPPORT_EFSSERVER          =       520
IPPORT_BIFFUDP          =         512
IPPORT_WHOSERVER          =       513
IPPORT_ROUTESERVER          =     520
IPPORT_RESERVED          =        1024
IMPLINK_IP          =             155
IMPLINK_LOWEXPER          =       156
IMPLINK_HIGHEXPER          =      158
IN_CLASSA_NET          =          0FF000000h
IN_CLASSA_NSHIFT          =       24
IN_CLASSA_HOST          =         000FFFFFFh
IN_CLASSA_MAX          =          128
IN_CLASSB_NET          =          0FFFF0000h
IN_CLASSB_NSHIFT          =       16
IN_CLASSB_HOST          =         00000FFFFh
IN_CLASSB_MAX          =          65536
IN_CLASSC_NET          =          0FFFFFF00h
IN_CLASSC_NSHIFT          =       8
IN_CLASSC_HOST          =         0000000FFh
INADDR_ANY          =             000000000h
INADDR_LOOPBACK          =        07F000001h
INADDR_BROADCAST          =       0FFFFFFFFh
INADDR_NONE          =            0FFFFFFFFh
SOCK_STREAM          =    1
SOCK_DGRAM          =     2
SOCK_RAW          =       3
SOCK_RDM          =       4
SOCK_SEQPACKET          = 5
SO_DEBUG          =       00001h
SO_ACCEPTCONN          =  00002h
SO_REUSEADDR          =   00004h
SO_KEEPALIVE          =   00008h
SO_DONTROUTE          =   00010h
SO_BROADCAST          =   00020h
SO_USELOOPBACK          = 00040h
SO_LINGER          =      00080h
SO_OOBINLINE          =   00100h
SOL_SOCKET            =   0FFFFh
SO_DONTLINGER          =  not SO_LINGER
SO_SNDBUF          =      01001h
SO_RCVBUF          =      01002h
SO_SNDLOWAT          =    01003h
SO_RCVLOWAT          =    01004h
SO_SNDTIMEO          =    01005h
SO_RCVTIMEO          =    01006h
SO_ERROR          =       01007h
SO_TYPE          =        01008h
TCP_NODELAY          =    00001h
AF_UNSPEC          =      0
AF_UNIX          =        1
AF_INET          =        2
AF_IMPLINK          =     3
AF_PUP          =         4
AF_CHAOS          =       5
AF_NS          =          6
AF_IPX          =         6
AF_ISO          =         7
AF_OSI          =         AF_ISO
AF_ECMA          =        8
AF_DATAKIT          =     9
AF_CCITT          =       10
AF_SNA          =         11
AF_DECnet          =      12
AF_DLI          =         13
AF_LAT          =         14
AF_HYLINK          =      15
AF_APPLETALK          =   16
AF_NETBIOS          =     17
AF_MAX          =         18
PF_UNSPEC          =      AF_UNSPEC
PF_UNIX          =        AF_UNIX
PF_INET          =        AF_INET
PF_IMPLINK          =     AF_IMPLINK
PF_PUP          =         AF_PUP
PF_CHAOS          =       AF_CHAOS
PF_NS          =          AF_NS
PF_IPX          =         AF_IPX
PF_ISO          =         AF_ISO
PF_OSI          =         AF_OSI
PF_ECMA          =        AF_ECMA
PF_DATAKIT          =     AF_DATAKIT
PF_CCITT          =       AF_CCITT
PF_SNA          =         AF_SNA
PF_DECnet          =      AF_DECnet
PF_DLI          =         AF_DLI
PF_LAT          =         AF_LAT
PF_HYLINK          =      AF_HYLINK
PF_APPLETALK          =   AF_APPLETALK
PF_MAX          =         AF_MAX
SOMAXCONN          =      5
MSG_OOB          =        01h
MSG_PEEK          =   02h
MSG_DONTROUTE          =  04h
MSG_MAXIOVLEN          =  16
MAXGETHOSTSTRUCT          =       1024
FD_READ          =        001h
FD_WRITE          =       002h
FD_OOB          =         004h
FD_ACCEPT          =      008h
FD_CONNECT          =     010h
FD_CLOSE          =       020h
WSABASEERR          =             10000
WSAEINTR          =               WSABASEERR+4
WSAEBADF          =               WSABASEERR+9
WSAEACCES          =              WSABASEERR+13
WSAEFAULT          =              WSABASEERR+14
WSAEINVAL          =              WSABASEERR+22
WSAEMFILE          =              WSABASEERR+24
WSAEWOULDBLOCK          =         WSABASEERR + 35
WSAEINPROGRESS          =         WSABASEERR + 36
WSAEALREADY          =            WSABASEERR + 37
WSAENOTSOCK          =            WSABASEERR + 38
WSAEDESTADDRREQ          =        WSABASEERR + 39
WSAEMSGSIZE          =            WSABASEERR + 40
WSAEPROTOTYPE          =          WSABASEERR + 41
WSAENOPROTOOPT          =         WSABASEERR + 42
WSAEPROTONOSUPPORT          =     WSABASEERR + 43
WSAESOCKTNOSUPPORT          =     WSABASEERR + 44
WSAEOPNOTSUPP          =          WSABASEERR + 45
WSAEPFNOSUPPORT          =        WSABASEERR + 46
WSAEAFNOSUPPORT          =        WSABASEERR + 47
WSAEADDRINUSE          =          WSABASEERR + 48
WSAEADDRNOTAVAIL          =       WSABASEERR + 49
WSAENETDOWN          =            WSABASEERR + 50
WSAENETUNREACH          =         WSABASEERR + 51
WSAENETRESET          =           WSABASEERR + 52
WSAECONNABORTED          =        WSABASEERR + 53
WSAECONNRESET          =          WSABASEERR + 54
WSAENOBUFS          =             WSABASEERR + 55
WSAEISCONN          =             WSABASEERR + 56
WSAENOTCONN          =            WSABASEERR + 57
WSAESHUTDOWN          =           WSABASEERR + 58
WSAETOOMANYREFS          =        WSABASEERR + 59
WSAETIMEDOUT          =           WSABASEERR + 60
WSAECONNREFUSED          =        WSABASEERR + 61
WSAELOOP          =               WSABASEERR + 62
WSAENAMETOOLONG          =        WSABASEERR + 63
WSAEHOSTDOWN          =           WSABASEERR + 64
WSAEHOSTUNREACH          =        WSABASEERR + 65
WSAENOTEMPTY          =           WSABASEERR + 66
WSAEPROCLIM          =            WSABASEERR + 67
WSAEUSERS          =              WSABASEERR + 68
WSAEDQUOT          =              WSABASEERR + 69
WSAESTALE          =              WSABASEERR + 70
WSAEREMOTE          =             WSABASEERR + 71
WSASYSNOTREADY          =         WSABASEERR+91
WSAVERNOTSUPPORTED          =     WSABASEERR+92
WSANOTINITIALISED          =      WSABASEERR+93
WSAHOST_NOT_FOUND          =      WSABASEERR + 1001
HOST_NOT_FOUND          =         WSAHOST_NOT_FOUND
WSATRY_AGAIN          =           WSABASEERR + 1002
TRY_AGAIN          =              WSATRY_AGAIN
WSANO_RECOVERY          =         WSABASEERR + 1003
NO_RECOVERY          =            WSANO_RECOVERY
WSANO_DATA          =             WSABASEERR + 1004
NO_DATA          =                WSANO_DATA
WSANO_ADDRESS          =          WSANO_DATA
NO_ADDRESS          =             WSANO_ADDRESS
EWOULDBLOCK          =            WSAEWOULDBLOCK
EINPROGRESS          =            WSAEINPROGRESS
EALREADY          =               WSAEALREADY
ENOTSOCK          =               WSAENOTSOCK
EDESTADDRREQ          =           WSAEDESTADDRREQ
EMSGSIZE          =               WSAEMSGSIZE
EPROTOTYPE          =             WSAEPROTOTYPE
ENOPROTOOPT          =            WSAENOPROTOOPT
EPROTONOSUPPORT          =        WSAEPROTONOSUPPORT
ESOCKTNOSUPPORT          =        WSAESOCKTNOSUPPORT
EOPNOTSUPP          =             WSAEOPNOTSUPP
EPFNOSUPPORT          =           WSAEPFNOSUPPORT
EAFNOSUPPORT          =           WSAEAFNOSUPPORT
EADDRINUSE          =             WSAEADDRINUSE
EADDRNOTAVAIL          =          WSAEADDRNOTAVAIL
ENETDOWN          =               WSAENETDOWN
ENETUNREACH          =            WSAENETUNREACH
ENETRESET          =              WSAENETRESET
ECONNABORTED          =           WSAECONNABORTED
ECONNRESET          =             WSAECONNRESET
ENOBUFS          =                WSAENOBUFS
EISCONN          =                WSAEISCONN
ENOTCONN          =               WSAENOTCONN
ESHUTDOWN          =              WSAESHUTDOWN
ETOOMANYREFS          =           WSAETOOMANYREFS
ETIMEDOUT          =              WSAETIMEDOUT
ECONNREFUSED          =           WSAECONNREFUSED
ELOOP          =                  WSAELOOP
ENAMETOOLONG          =           WSAENAMETOOLONG
EHOSTDOWN          =              WSAEHOSTDOWN
EHOSTUNREACH          =           WSAEHOSTUNREACH
ENOTEMPTY          =              WSAENOTEMPTY
EPROCLIM          =               WSAEPROCLIM
EUSERS          =                 WSAEUSERS
EDQUOT          =                 WSAEDQUOT
ESTALE          =                 WSAESTALE
EREMOTE          =                WSAEREMOTE
FD_SETSIZE  = 64
INVALID_SOCKET              = not 0
SOCKET_ERROR                = -1
SOCKET_BUFFER_SIZE          = 512
ICMP_ECHOREPLY          =   0
ICMP_ECHOREQ            =   8
IMAGE_SIZEOF_SECTION_HEADER = 40

; ------------------------ wsock32 structures -----------------------------

fd_set struct
  fd_count  DWORD      ?
  fd_array  SOCKET FD_SETSIZE dup(?)
fd_set ends

timeval struct
  tv_sec   DWORD      ?
  tv_usec  DWORD      ?
timeval ends

S_UN_B struct
  s_b1 BYTE ?
  s_b2 BYTE ?
  s_b3 BYTE ?
  s_b4 BYTE ?
S_UN_B ends

S_UN_W struct
  s_w1 WORD ?
  s_w2 WORD ?
S_UN_W ends

ADDRESS_UNION union
   S_un_b S_UN_B <>
   S_un_w S_UN_W <>
   S_addr DWORD ?
ADDRESS_UNION ends

in_addr struct
  S_un ADDRESS_UNION <>
in_addr ends

sockaddr_in struct
  sin_family    WORD      ?
  sin_port      WORD      ?
  sin_addr      in_addr <>
  sin_zero      BYTE 8 dup (?)
sockaddr_in ends

sockaddr struct
  sa_family     WORD      ?
  sa_data       BYTE 14 dup(?)
sockaddr ends

WSADATA struct
  wVersion      WORD      ?
  wHighVersion  WORD      ?
  szDescription BYTE WSADESCRIPTION_LEN + 1 dup (?)
  szSystemStatus  BYTE WSASYS_STATUS_LEN + 1 dup (?)
  iMaxSockets   WORD      ?
  iMaxUdpDg     WORD      ?
  lpVendorInfo  DWORD      ?
WSADATA ends

sockproto struct
  sp_family     WORD      ?
  sp_protocol   WORD      ?
sockproto ends

linger struct
  l_onoff   WORD      ?
  l_linger  WORD      ?
linger ends

hostent struct
  h_name      DWORD      ?
  h_alias     DWORD      ?
  h_addr      WORD       ?
  h_len       WORD       ?
  h_list      DWORD      ?
hostent ends

netent struct
  n_name      DWORD      ?
  n_aliases   DWORD      ?
  n_addrtype  WORD       ?
  n_net       DWORD      ?
netent ends

servent struct
  s_name     DWORD      ?
  s_aliases  DWORD      ?
  s_port     WORD       ?
  s_proto    DWORD      ?
servent ends

icmp_hdr struct
  icmp_type   BYTE      ?
  icmp_code   BYTE      ?
  icmp_cksum  WORD      ?
  icmp_id     WORD      ?
  icmp_seq    WORD      ?
  icmp_data   BYTE      ?
icmp_hdr ends

ip_hdr struct
  ip_hlv    BYTE      ?
  ip_tos    BYTE      ?
  ip_len    WORD      ?
  ip_id     WORD      ?
  ip_off    WORD      ?
  ip_ttl    BYTE      ?
  ip_p      BYTE      ?
  ip_cksum  WORD      ?
  ip_src    DWORD      ?
  ip_dest   DWORD      ?
ip_hdr ends

ICMP_OPTIONS struct
  Ttl              BYTE      ?
  Tos              BYTE      ?
  Flags            BYTE      ?
  OptionsSize      BYTE      ?
  OptionsData      DWORD      ?
ICMP_OPTIONS ends

ICMP_ECHO_REPLY struct
  Address          DWORD      ?
  Status           DWORD      ?
  RoundTripTime    DWORD      ?
  DataSize         WORD      ?
  Reserved         WORD      ?
  DataPointer      DWORD      ?
  Options          DWORD      ?
  zData            BYTE 250 dup (?)
ICMP_ECHO_REPLY ends

; ----------------------------------------
; aditional winsock equates and structure
; contributed by Thomas Bleeker.
; ----------------------------------------
FD_READ_BIT                     = 0
FD_WRITE_BIT                    = 1
FD_OOB_BIT                      = 2
FD_ACCEPT_BIT                   = 3
FD_CONNECT_BIT                  = 4
FD_CLOSE_BIT                    = 5
FD_QOS_BIT                      = 6
FD_GROUP_QOS_BIT                = 7
FD_ROUTING_INTERFACE_CHANGE_BIT = 8
FD_ADDRESS_LIST_CHANGE_BIT      = 9

FD_MAX_EVENTS                   = 10
FD_ALL_EVENTS                   = (1 SHL FD_MAX_EVENTS) - 1

WSANETWORKEVENTS struct
    lNetworkEvents              dd  ?
    iErrorCode                  dd  FD_MAX_EVENTS dup (?)
WSANETWORKEVENTS ends

; ************************* winsock2 equates ******************************

INCL_WINSOCK_API_PROTOTYPES      = 1
INCL_WINSOCK_API_TYPEDEFS        = 0
IPPROTO_HOPOPTS                  = 0
IPPROTO_IGMP                     = 2
IPPROTO_IPV4                     = 4
IPPROTO_IPV6                     = 41
IPPROTO_ROUTING                  = 43
IPPROTO_FRAGMENT                 = 44
IPPROTO_ESP                      = 50
IPPROTO_AH                       = 51
IPPROTO_ICMPV6                   = 58
IPPROTO_NONE                     = 59
IPPROTO_DSTOPTS                  = 60
IPPROTO_ICLFXBM                  = 78
IN_CLASSD_NET                    = 0F0000000h
IN_CLASSD_NSHIFT                 = 28
IN_CLASSD_HOST                   = 0fffffffh
FROM_PROTOCOL_INFO               = (-1)
SO_GROUP_ID                      = 2001h
SO_GROUP_PRIORITY                = 2002h
SO_MAX_MSG_SIZE                  = 2003h
PVD_CONFIG                       = 3001h
SO_CONDITIONAL_ACCEPT            = 3002h
AF_VOICEVIEW                     = 18
AF_FIREFOX                       = 19
AF_UNKNOWN1                      = 20
AF_BAN                           = 21
AF_ATM                           = 22
AF_INET6                         = 23
AF_CLUSTER                       = 24
AF_12844                         = 25
AF_IRDA                          = 26
AF_NETDES                        = 28
AF_TCNPROCESS                    = 29
AF_TCNMESSAGE                    = 30
AF_ICLFXBM                       = 31
AF_BTH                           = 32
_SS_MAXSIZE                      = 128
PF_VOICEVIEW                     = AF_VOICEVIEW
PF_FIREFOX                       = AF_FIREFOX
PF_UNKNOWN1                      = AF_UNKNOWN1
PF_BAN                           = AF_BAN
PF_ATM                           = AF_ATM
PF_INET6                         = AF_INET6
MSG_PARTIAL                      = 8000h
MSG_INTERRUPT                    = 10h
WSAEDISCON                       = (WSABASEERR+101)
WSAENOMORE                       = (WSABASEERR+102)
WSAECANCELLED                    = (WSABASEERR+103)
WSAEINVALIDPROCTABLE             = (WSABASEERR+104)
WSAEINVALIDPROVIDER              = (WSABASEERR+105)
WSAEPROVIDERFAILEDINIT           = (WSABASEERR+106)
WSASYSCALLFAILURE                = (WSABASEERR+107)
WSASERVICE_NOT_FOUND             = (WSABASEERR+108)
WSATYPE_NOT_FOUND                = (WSABASEERR+109)
WSA_E_NO_MORE                    = (WSABASEERR+110)
WSA_E_CANCELLED                  = (WSABASEERR+111)
WSAEREFUSED                      = (WSABASEERR+112)
WSA_QOS_RECEIVERS                = (WSABASEERR + 1005)
WSA_QOS_SENDERS                  = (WSABASEERR + 1006)
WSA_QOS_NO_SENDERS               = (WSABASEERR + 1007)
WSA_QOS_NO_RECEIVERS             = (WSABASEERR + 1008)
WSA_QOS_REQUEST_CONFIRMED        = (WSABASEERR + 1009)
WSA_QOS_ADMISSION_FAILURE        = (WSABASEERR + 1010)
WSA_QOS_POLICY_FAILURE           = (WSABASEERR + 1011)
WSA_QOS_BAD_STYLE                = (WSABASEERR + 1012)
WSA_QOS_BAD_OBJECT               = (WSABASEERR + 1013)
WSA_QOS_TRAFFIC_CTRL_ERROR       = (WSABASEERR + 1014)
WSA_QOS_GENERIC_ERROR            = (WSABASEERR + 1015)
WSA_QOS_ESERVICETYPE             = (WSABASEERR + 1016)
WSA_QOS_EFLOWSPEC                = (WSABASEERR + 1017)
WSA_QOS_EPROVSPECBUF             = (WSABASEERR + 1018)
WSA_QOS_EFILTERSTYLE             = (WSABASEERR + 1019)
WSA_QOS_EFILTERTYPE              = (WSABASEERR + 1020)
WSA_QOS_EFILTERCOUNT             = (WSABASEERR + 1021)
WSA_QOS_EOBJLENGTH               = (WSABASEERR + 1022)
WSA_QOS_EFLOWCOUNT               = (WSABASEERR + 1023)
WSA_QOS_EUNKOWNPSOBJ             = (WSABASEERR + 1024)
WSA_QOS_EPOLICYOBJ               = (WSABASEERR + 1025)
WSA_QOS_EFLOWDESC                = (WSABASEERR + 1026)
WSA_QOS_EPSFLOWSPEC              = (WSABASEERR + 1027)
WSA_QOS_EPSFILTERSPEC            = (WSABASEERR + 1028)
WSA_QOS_ESDMODEOBJ               = (WSABASEERR + 1029)
WSA_QOS_ESHAPERATEOBJ            = (WSABASEERR + 1030)
WSA_QOS_RESERVED_PETYPE          = (WSABASEERR + 1031)
WSA_INVALID_EVENT                = (NULL)
WSA_MAXIMUM_WAIT_EVENTS          = (MAXIMUM_WAIT_OBJECTS)
WSA_WAIT_FAILED                  = (WAIT_FAILED)
WSA_WAIT_IO_COMPLETION           = (WAIT_IO_COMPLETION)
WSA_WAIT_TIMEOUT                 = (WAIT_TIMEOUT)
WSA_INFINITE                     = (INFINITE)
;WSAAPI                           = FAR PASCAL
WSA_IO_PENDING                   = (WSAEWOULDBLOCK)
WSA_IO_INCOMPLETE                = (WSAEWOULDBLOCK)
WSA_INVALID_HANDLE               = (WSAENOTSOCK)
WSA_INVALID_PARAMETER            = (WSAEINVAL)
WSA_NOT_ENOUGH_MEMORY            = (WSAENOBUFS)
WSA_OPERATION_ABORTED            = (WSAEINTR)
WSA_WAIT_EVENT_0                 = (0)
CF_ACCEPT                        = 0000h
CF_REJECT                        = 0001h
CF_DEFER                         = 0002h
SD_RECEIVE                       = 00h
SD_SEND                          = 01h
SD_BOTH                          = 02h
SG_UNCONSTRAINED_GROUP           = 01h
SG_CONSTRAINED_GROUP             = 02h
MAX_PROTOCOL_CHAIN               = 7
BASE_PROTOCOL                    = 1
LAYERED_PROTOCOL                 = 0
WSAPROTOCOL_LEN                  = 255
PFL_MULTIPLE_PROTO_ENTRIES       = 00000001h
PFL_RECOMMENDED_PROTO_ENTRY      = 00000002h
PFL_HIDDEN                       = 00000004h
PFL_MATCHES_PROTOCOL_ZERO        = 00000008h
XP1_CONNECTIONLESS               = 00000001h
XP1_GUARANTEED_DELIVERY          = 00000002h
XP1_GUARANTEED_ORDER             = 00000004h
XP1_MESSAGE_ORIENTED             = 00000008h
XP1_PSEUDO_STREAM                = 00000010h
XP1_GRACEFUL_CLOSE               = 00000020h
XP1_EXPEDITED_DATA               = 00000040h
XP1_CONNECT_DATA                 = 00000080h
XP1_DISCONNECT_DATA              = 00000100h
XP1_SUPPORT_BROADCAST            = 00000200h
XP1_SUPPORT_MULTIPOINT           = 00000400h
XP1_MULTIPOINT_CONTROL_PLANE     = 00000800h
XP1_MULTIPOINT_DATA_PLANE        = 00001000h
XP1_QOS_SUPPORTED                = 00002000h
XP1_INTERRUPT                    = 00004000h
XP1_UNI_SEND                     = 00008000h
XP1_UNI_RECV                     = 00010000h
XP1_IFS_HANDLES                  = 00020000h
XP1_PARTIAL_MESSAGE              = 00040000h
BIGENDIAN                        = 0000h
LITTLEENDIAN                     = 0001h
SECURITY_PROTOCOL_NONE           = 0000h
JL_SENDER_ONLY                   = 01h
JL_RECEIVER_ONLY                 = 02h
JL_BOTH                          = 04h
WSA_FLAG_OVERLAPPED              = 01h
WSA_FLAG_MULTIPOINT_C_ROOT       = 02h
WSA_FLAG_MULTIPOINT_C_LEAF       = 04h
WSA_FLAG_MULTIPOINT_D_ROOT       = 08h
WSA_FLAG_MULTIPOINT_D_LEAF       = 10h
IOC_UNIX                         = 00000000h
IOC_WS2                          = 08000000h
IOC_PROTOCOL                     = 10000000h
IOC_VENDOR                       = 18000000h
TH_NETDEV                        = 00000001h
TH_TAPI                          = 00000002h
SERVICE_MULTIPLE                 = 1
NS_ALL                           = (0)
NS_SAP                           = (1)
NS_NDS                           = (2)
NS_PEER_BROWSE                   = (3)
NS_SLP                           = (5)
NS_DHCP                          = (6)
NS_TCPIP_LOCAL                   = (10)
NS_TCPIP_HOSTS                   = (11)
NS_DNS                           = (12)
NS_NETBT                         = (13)
NS_WINS                          = (14)
NS_NLA                           = (15)
NS_NBP                           = (20)
NS_MS                            = (30)
NS_STDA                          = (31)
NS_NTDS                          = (32)
NS_X500                          = (40)
NS_NIS                           = (41)
NS_NISPLUS                       = (42)
NS_WRQ                           = (50)
NS_NETDES                        = (60)
RES_UNUSED_1                     = 1
RES_FLUSH_CACHE                  = 2
RES_SERVICE                      = 4
LUP_DEEP                         = 0001h
LUP_CONTAINERS                   = 0002h
LUP_NOCONTAINERS                 = 0004h
LUP_NEAREST                      = 0008h
LUP_RETURN_NAME                  = 0010h
LUP_RETURN_TYPE                  = 0020h
LUP_RETURN_VERSION               = 0040h
LUP_RETURN_COMMENT               = 0080h
LUP_RETURN_ADDR                  = 0100h
LUP_RETURN_BLOB                  = 0200h
LUP_RETURN_ALIASES               = 0400h
LUP_RETURN_QUERY_STRING          = 0800h
LUP_RETURN_ALL                   = 0FF0h
LUP_RES_SERVICE                  = 8000h
LUP_FLUSHCACHE                   = 1000h
LUP_FLUSHPREVIOUS                = 2000h
RESULT_IS_ALIAS                  = 0001h
RESULT_IS_ADDED                  = 0010h
RESULT_IS_CHANGED                = 0020h
RESULT_IS_DELETED                = 0040h

;;;; end wsock

;;;; wsock_xtra

FD_QOS                      = (1 SHL FD_QOS_BIT)
FD_GROUP_QOS                = (1 SHL FD_GROUP_QOS_BIT)
FD_ROUTING_INTERFACE_CHANGE = (1 SHL FD_ROUTING_INTERFACE_CHANGE_BIT)
FD_ADDRESS_LIST_CHANGE      = (1 SHL FD_ADDRESS_LIST_CHANGE_BIT)

SO_PROTOCOL_INFOA                = 2004h
SO_PROTOCOL_INFOW                = 2005h
if UNICODE eq TRUE
    SO_PROTOCOL_INFO             = SO_PROTOCOL_INFOW
else
    SO_PROTOCOL_INFO             = SO_PROTOCOL_INFOA
end if

PF_BTH                           = AF_BTH
MSG_WAITALL                      = 8h
XP1_SAN_SUPPORT_SDP              = 00080000h
WSA_FLAG_ACCESS_SYSTEM_SECURITY  = 40h
NS_BTH                           = 16
NS_EMAIL                         = 37
NS_PNRPNAME                      = 38
NS_PNRPCLOUD                     = 39
LUP_NON_AUTHORITATIVE            = 4000h
LUP_SECURE                       = 8000h
LUP_RETURN_PREFERRED_NAMES       = 10000h
LUP_ADDRCONFIG                   = 00100000h
LUP_DUAL_ADDR                    = 00200000h
POLLRDNORM                       = 0100h
POLLRDBAND                       = 0200h
POLLIN                           = POLLRDNORM or POLLRDBAND
POLLPRI                          = 0400h
POLLWRNORM                       = 0010h
POLLOUT                          = POLLWRNORM
POLLWRBAND                       = 0020h
POLLERR                          = 0001h
POLLHUP                          = 0002h
POLLNVAL                         = 0004h


;;;; end wsock_xtra

;;;; toolhlp

;------------------------------ ToolHelp 32 equates ---------------------
MAX_MODULE_NAME32  = 255
TH32CS_SNAPHEAPLIST     = 1
TH32CS_SNAPPROCESS      = 2
TH32CS_SNAPTHREAD       = 4
TH32CS_SNAPMODULE       = 8
TH32CS_SNAPALL          = TH32CS_SNAPHEAPLIST + TH32CS_SNAPPROCESS + TH32CS_SNAPTHREAD + TH32CS_SNAPMODULE
TH32CS_INHERIT          = 80000000h
HF32_DEFAULT            = 1
HF32_SHARED             = 2
LF32_FIXED              = 1
LF32_FREE               = 2
LF32_MOVEABLE           = 4

HEAPLIST32 struct
    dwSize              DWORD ?
    th32ProcessID       DWORD ?
    th32HeapID          DWORD ?
    dwFlags             DWORD ?
HEAPLIST32 ends

HEAPENTRY32 struct
    dwSize          DWORD ?
    hHandle         DWORD ?
    dwAddress       DWORD ?
    dwBlockSize     DWORD ?
    dwFlags         DWORD ?
    dwLockCount     DWORD ?
    dwResvd         DWORD ?
    th32ProcessID   DWORD ?
    th32HeapID      DWORD ?
HEAPENTRY32 ends

PROCESSENTRY32 struct
    dwSize              DWORD ?
    cntUsage            DWORD ?
    th32ProcessID       DWORD ?
    th32DefaultHeapID   DWORD ?
    th32ModuleID        DWORD ?
    cntThreads          DWORD ?
    th32ParentProcessID DWORD ?
    pcPriClassBase      DWORD ?
    dwFlags             DWORD ?
    szExeFile           db MAX_PATH dup(?)
PROCESSENTRY32 ends

THREADENTRY32 struct
    dwSize              DWORD ?
    cntUsage            DWORD ?
    th32ThreadID        DWORD ?
    th32OwnerProcessID  DWORD ?
    tpBasePri           DWORD ?
    tpDeltaPri          DWORD ?
    dwFlags             DWORD ?
THREADENTRY32 ends

MODULEENTRY32 struct
    dwSize          DWORD ?
    th32ModuleID    DWORD ?
    th32ProcessID   DWORD ?
    GlblcntUsage    DWORD ?
    ProccntUsage    DWORD ?
    modBaseAddr     DWORD ?
    modBaseSize     DWORD ?
    hModule         DWORD ?
    szModule        db MAX_MODULE_NAME32+1 dup(?)
    szExePath       db MAX_PATH dup(?)
MODULEENTRY32 ends

;;;; end toolhlp

;;;; propsht

;--------- These are the equates & structures for property sheets ---------

MAXPROPPAGES            =   100

;LPFNPSPCALLBACK         =   <LPFNPSPCALLBACKA>

PSP_DEFAULT             =   00000000h
PSP_DLGINDIRECT         =   00000001h
PSP_USEDWORD            =   00000002h
PSP_USEICONID           =   00000004h
PSP_USETITLE            =   00000008h
PSP_RTLREADING          =   00000010h

PSP_HASHELP             =   00000020h
PSP_USEREFPARENT        =   00000040h
PSP_USECALLBACK         =   00000080h
PSP_PREMATURE           =   00000400h

PSP_HIDEHEADER          =   00000800h
PSP_USEHEADERTITLE      =   00001000h
PSP_USEHEADERSUBTITLE   =   00002000h

PSPCB_RELEASE           =     1
PSPCB_CREATE            =     2

PROPSHEETPAGE struct
        dwSize              DWORD ?
        dwFlags             DWORD ?
        hInstance           DWORD ?
          union
            pszTemplate     DWORD ?
            pResource       DWORD ?
          ends
          union
            hIcon           DWORD ?
            pszIcon         DWORD ?
          ends
        pszTitle            DWORD ?
        pfnDlgProc          DWORD ?
        lParam              DWORD ?
        pfnCallback         DWORD ?
        pcRefParent         DWORD ?
        pszHeaderTitle      DWORD ?
        pszHeaderSubTitle   DWORD ?
PROPSHEETPAGE ends
TYPEDEF LPPROPSHEETPAGE, PVOID
TYPEDEF LPCPROPSHEETPAGE, LPPROPSHEETPAGE

PSH_DEFAULT           =   00000000h
PSH_PROPTITLE         =   00000001h
PSH_USEDWORD          =   00000002h
PSH_USEICONID         =   00000004h
PSH_PROPSHEETPAGE     =   00000008h
PSH_WIZARDHASFINISH   =   00000010h
PSH_WIZARD            =   00000020h
PSH_USEPSTARTPAGE     =   00000040h
PSH_NOAPPLYNOW        =   00000080h
PSH_USECALLBACK       =   00000100h
PSH_HASHELP           =   00000200h
PSH_MODELESS          =   00000400h
PSH_RTLREADING        =   00000800h
PSH_WIZARDCONTEXTHELP =   00001000h

if defined WIN32_IE5
    PSH_WIZARD97  =   01000000h
else
    PSH_WIZARD97  =   00002000h
end if

PSH_WATERMARK         =   00008000h
PSH_USEHBMWATERMARK   =   00010000h
PSH_USEHPLWATERMARK   =   00020000h
PSH_STRETCHWATERMARK  =   00040000h
PSH_HEADER            =   00080000h
PSH_USEHBMHEADER      =   00100000h
PSH_USEPAGELANG       =   00200000h

PROPSHEETHEADER struct
        dwSize              DWORD ?
        dwFlags             DWORD ?
        hwndParent          DWORD ?
        hInstance           DWORD ?
        union
            hIcon           DWORD ?
            pszIcon         DWORD ?
        ends
        pszCaption          DWORD ?
        nPages              DWORD ?
          union
            nStartPage      DWORD ?
            pStartPage      DWORD ?
          ends
          union
            ppsp            DWORD ?
            phpage          DWORD ?
          ends
        pfnCallback         DWORD ?
          union
            hbmWatermark    DWORD ?
            pszbmWatermark  DWORD ?
          ends
        hplWatermark        DWORD ?
        union
            hbmHeader       DWORD ?
            pszbmHeader     DWORD ?
        ends

PROPSHEETHEADER ends

PSCB_INITIALIZED        =   1
PSCB_PRECREATE          =   2

PSHNOTIFY struct
    hdr         NMHDR <>
    lParam      DWORD ?
PSHNOTIFY ends

PSN_FIRST               =   0-200
PSN_LAST                =   0-299

PSN_SETACTIVE           =   PSN_FIRST-0
PSN_KILLACTIVE          =   PSN_FIRST-1
PSN_APPLY               =   PSN_FIRST-2
PSN_RESET               =   PSN_FIRST-3
PSN_HELP                =   PSN_FIRST-5
PSN_WIZBACK             =   PSN_FIRST-6
PSN_WIZNEXT             =   PSN_FIRST-7
PSN_WIZFINISH           =   PSN_FIRST-8
PSN_QUERYCANCEL         =   PSN_FIRST-9
PSN_GETOBJECT           =   PSN_FIRST-10

PSNRET_NOERROR              =   0
PSNRET_INVALID              =   1
PSNRET_INVALID_NOCHANGEPAGE =   2


PSM_SETCURSEL           =   WM_USER + 101
PSM_REMOVEPAGE          =   WM_USER + 102
PSM_ADDPAGE             =   WM_USER + 103
PSM_CHANGED             =   WM_USER + 104
PSM_RESTARTWINDOWS      =   WM_USER + 105
PSM_REBOOTSYSTEM        =   WM_USER + 106
PSM_CANCELTOCLOSE       =   WM_USER + 107
PSM_QUERYSIBLINGS       =   WM_USER + 108
PSM_UNCHANGED           =   WM_USER + 109
PSM_APPLY               =   WM_USER + 110
PSM_SETTITLEA           =   WM_USER + 111

PSM_SETTITLE            =   PSM_SETTITLEA
PSM_SETWIZBUTTONS       =   WM_USER + 112

PSWIZB_BACK             =   00000001h
PSWIZB_NEXT             =   00000002h
PSWIZB_FINISH           =   00000004h
PSWIZB_DISABLEDFINISH   =   00000008h

PSM_PRESSBUTTON         =   WM_USER + 113

PSBTN_BACK              =   0
PSBTN_NEXT              =   1
PSBTN_FINISH            =   2
PSBTN_OK                =   3
PSBTN_APPLYNOW          =   4
PSBTN_CANCEL            =   5
PSBTN_HELP              =   6
PSBTN_MAX               =   6

PSM_SETCURSELID         =   WM_USER + 114
PSM_SETFINISHTEXTA      =   WM_USER + 115
PSM_SETFINISHTEXT       =   PSM_SETFINISHTEXTA

PSM_GETTABCONTROL       =   WM_USER + 116
PSM_ISDIALOGMESSAGE     =   WM_USER + 117
PSM_GETCURRENTPAGEDWORD =   WM_USER + 118

ID_PSRESTARTWINDOWS     =   2
ID_PSREBOOTSYSTEM       =   ID_PSRESTARTWINDOWS or 1

WIZ_CXDLG               =   276
WIZ_CYDLG               =   140

WIZ_CXBMP               =   80

WIZ_BODYX               =   92
WIZ_BODYCX              =   184

PROP_SM_CXDLG           =   212
PROP_SM_CYDLG           =   188

PROP_MED_CXDLG          =   227
PROP_MED_CYDLG          =   215

PROP_LG_CXDLG           =   252
PROP_LG_CYDLG           =   218

;;;; end propsht

;;;; winnt

; --------------------- equates & structures for WINNT ---------------------

MAX_NATURAL_ALIGNMENT           = sizeof.DWORD
LANG_AFRIKAANS = 36h
LANG_ALBANIAN = 1ch
LANG_ARABIC = 01h
LANG_ARMENIAN = 2bh
LANG_ASSAMESE = 4dh
LANG_AZERI = 2ch
LANG_BASQUE = 2dh
LANG_BELARUSIAN = 23h
LANG_BENGALI = 45h
LANG_CATALAN = 03h
LANG_ESTONIAN = 25h
LANG_FAEROESE = 38h
LANG_FARSI = 29h
LANG_GEORGIAN = 37h
LANG_GUJARATI = 47h
LANG_HEBREW = 0dh
LANG_HINDI = 39h
LANG_INDONESIAN = 21h
LANG_KANNADA = 4bh
LANG_KASHMIRI = 60h
LANG_KAZAK = 3fh
LANG_KONKANI = 57h
LANG_LATVIAN = 26h
LANG_LITHUANIAN = 27h
LANG_MACEDONIAN = 2fh
LANG_MALAY = 3eh
LANG_MALAYALAM = 4ch
LANG_MANIPURI = 58h
LANG_MARATHI = 4eh
LANG_NEPALI = 61h
LANG_ORIYA = 48h
LANG_PUNJABI = 46h
LANG_SANSKRIT = 4fh
LANG_SERBIAN = 1ah
LANG_SINDHI = 59h
LANG_SWAHILI = 41h
LANG_TAMIL = 49h
LANG_TATAR = 44h
LANG_TELUGU = 4ah
LANG_THAI = 1eh
LANG_UKRAINIAN = 22h
LANG_URDU = 20h
LANG_UZBEK = 43h
LANG_VIETNAMESE = 2ah
SUBLANG_ARABIC_SAUDI_ARABIA = 01h
SUBLANG_ARABIC_IRAQ = 02h
SUBLANG_ARABIC_EGYPT = 03h
SUBLANG_ARABIC_LIBYA = 04h
SUBLANG_ARABIC_ALGERIA = 05h
SUBLANG_ARABIC_MOROCCO = 06h
SUBLANG_ARABIC_TUNISIA = 07h
SUBLANG_ARABIC_OMAN = 08h
SUBLANG_ARABIC_YEMEN = 09h
SUBLANG_ARABIC_SYRIA = 0ah
SUBLANG_ARABIC_JORDAN = 0bh
SUBLANG_ARABIC_LEBANON = 0ch
SUBLANG_ARABIC_KUWAIT = 0dh
SUBLANG_ARABIC_UAE = 0eh
SUBLANG_ARABIC_BAHRAIN = 0fh
SUBLANG_ARABIC_QATAR = 10h
SUBLANG_AZERI_LATIN = 01h
SUBLANG_AZERI_CYRILLIC = 02h
SUBLANG_CHINESE_MACAU = 05h
SUBLANG_ENGLISH_SOUTH_AFRICA = 07h
SUBLANG_ENGLISH_JAMAICA = 08h
SUBLANG_ENGLISH_CARIBBEAN = 09h
SUBLANG_ENGLISH_BELIZE = 0ah
SUBLANG_ENGLISH_TRINIDAD = 0bh
SUBLANG_ENGLISH_ZIMBABWE = 0ch
SUBLANG_ENGLISH_PHILIPPINES = 0dh
SUBLANG_FRENCH_LUXEMBOURG = 05h
SUBLANG_FRENCH_MONACO = 06h
SUBLANG_GERMAN_LUXEMBOURG = 04h
SUBLANG_GERMAN_LIECHTENSTEIN = 05h
SUBLANG_KASHMIRI_INDIA = 02h
SUBLANG_KOREAN = 01h
SUBLANG_LITHUANIAN = 01h
SUBLANG_LITHUANIAN_CLASSIC = 02h
SUBLANG_MALAY_MALAYSIA = 01h
SUBLANG_MALAY_BRUNEI_DARUSSALAM = 02h
SUBLANG_NEPALI_INDIA = 02h
SUBLANG_SERBIAN_LATIN = 02h
SUBLANG_SERBIAN_CYRILLIC = 03h
SUBLANG_SPANISH_GUATEMALA = 04h
SUBLANG_SPANISH_COSTA_RICA = 05h
SUBLANG_SPANISH_PANAMA = 06h
SUBLANG_SPANISH_DOMINICAN_REPUBLIC = 07h
SUBLANG_SPANISH_VENEZUELA = 08h
SUBLANG_SPANISH_COLOMBIA = 09h
SUBLANG_SPANISH_PERU = 0ah
SUBLANG_SPANISH_ARGENTINA = 0bh
SUBLANG_SPANISH_ECUADOR = 0ch
SUBLANG_SPANISH_CHILE = 0dh
SUBLANG_SPANISH_URUGUAY = 0eh
SUBLANG_SPANISH_PARAGUAY = 0fh
SUBLANG_SPANISH_BOLIVIA = 10h
SUBLANG_SPANISH_EL_SALVADOR = 11h
SUBLANG_SPANISH_HONDURAS = 12h
SUBLANG_SPANISH_NICARAGUA = 13h
SUBLANG_SPANISH_PUERTO_RICO = 14h
SUBLANG_SWEDISH = 01h
SUBLANG_SWEDISH_FINLAND = 02h
SUBLANG_URDU_PAKISTAN = 01h
SUBLANG_URDU_INDIA = 02h
SUBLANG_UZBEK_LATIN = 01h
SUBLANG_UZBEK_CYRILLIC = 02h
SORT_CHINESE_PRCP = 0h
SORT_CHINESE_PRC = 2h
SORT_CHINESE_BOPOMOFO = 3h
SORT_GERMAN_PHONE_BOOK = 1h
SORT_HUNGARIAN_DEFAULT = 0h
SORT_HUNGARIAN_TECHNICAL = 1h
SORT_GEORGIAN_TRADITIONAL = 0h
SORT_GEORGIAN_MODERN = 1h
NLS_VALID_LOCALE_MASK = 000fffffh
STATUS_SEGMENT_NOTIFICATION = 40000005h
STATUS_GUARD_PAGE_VIOLATION = 80000001h
STATUS_INVALID_HANDLE = 0C0000008h
STATUS_FLOAT_MULTIPLE_FAULTS = 0C00002B4h
STATUS_FLOAT_MULTIPLE_TRAPS = 0C00002B5h
STATUS_ILLEGAL_VLM_REFERENCE = 0C00002C0h
MAXIMUM_WAIT_OBJECTS = 64
MAXIMUM_SUSPEND_COUNT = MAXCHAR
CONTEXT_EXTENDED_REGISTERS = (CONTEXT_i386 + 00000020h)
SECURITY_NULL_SID_AUTHORITY equ 0,0,0,0,0,0
SECURITY_WORLD_SID_AUTHORITY equ 0,0,0,0,0,1
SECURITY_LOCAL_SID_AUTHORITY equ 0,0,0,0,0,2
SECURITY_CREATOR_SID_AUTHORITY equ 0,0,0,0,0,3
SECURITY_NON_UNIQUE_AUTHORITY equ 0,0,0,0,0,4
SECURITY_CREATOR_OWNER_SERVER_RID = (00000002h)
SECURITY_CREATOR_GROUP_SERVER_RID = (00000003h)
SECURITY_NT_AUTHORITY equ 0,0,0,0,0,5
SECURITY_PROXY_RID = (00000008h)
SECURITY_ENTERPRISE_CONTROLLERS_RID = (00000009h)
SECURITY_SERVER_LOGON_RID = SECURITY_ENTERPRISE_CONTROLLERS_RID
SECURITY_PRINCIPAL_SELF_RID = (0000000Ah)
SECURITY_AUTHENTICATED_USER_RID = (0000000Bh)
SECURITY_RESTRICTED_CODE_RID = (0000000Ch)
SECURITY_LOGON_IDS_RID_COUNT = (3)
DOMAIN_USER_RID_KRBTGT = (000001F6h)
DOMAIN_GROUP_RID_COMPUTERS = (00000203h)
DOMAIN_GROUP_RID_CONTROLLERS = (00000204h)
DOMAIN_GROUP_RID_CERT_ADMINS = (00000205h)
DOMAIN_GROUP_RID_SCHEMA_ADMINS = (00000206h)
SYSTEM_LUID equ 3E7h, 0h
ANONYMOUS_LOGON_LUID equ 3e6h, 0h
SE_GROUP_USE_FOR_DENY_ONLY = (00000010h)
ACL_REVISION_DS = (4)
MIN_ACL_REVISION = ACL_REVISION2
ACL_REVISION3 = (3)
ACL_REVISION4 = (4)
MAX_ACL_REVISION = ACL_REVISION4
ACCESS_MIN_MS_ACE_TYPE = (0h)
ACCESS_MAX_MS_V2_ACE_TYPE = (3h)
ACCESS_ALLOWED_COMPOUND_ACE_TYPE = (4h)
ACCESS_MAX_MS_V3_ACE_TYPE = (4h)
ACCESS_MIN_MS_OBJECT_ACE_TYPE = (5h)
ACCESS_ALLOWED_OBJECT_ACE_TYPE = (5h)
ACCESS_DENIED_OBJECT_ACE_TYPE = (6h)
SYSTEM_AUDIT_OBJECT_ACE_TYPE = (7h)
SYSTEM_ALARM_OBJECT_ACE_TYPE = (8h)
ACCESS_MAX_MS_OBJECT_ACE_TYPE = (8h)
ACCESS_MAX_MS_V4_ACE_TYPE = (8h)
ACCESS_MAX_MS_ACE_TYPE = (8h)
INHERITED_ACE = (10h)
ACE_OBJECT_TYPE_PRESENT = 1h
ACE_INHERITED_OBJECT_TYPE_PRESENT = 2h
SE_DACL_AUTO_INHERIT_REQ = (0100h)
SE_SACL_AUTO_INHERIT_REQ = (0200h)
SE_DACL_AUTO_INHERITED = (0400h)
SE_SACL_AUTO_INHERITED = (0800h)
SE_DACL_PROTECTED = (1000h)
SE_SACL_PROTECTED = (2000h)
ACCESS_OBJECT_GUID = 0
ACCESS_PROPERTY_SET_GUID = 1
ACCESS_PROPERTY_GUID = 2
ACCESS_MAX_LEVEL = 4
AUDIT_ALLOW_NO_PRIVILEGE = 1h

;ACCESS_DS_SOURCE_A equ "DS"
;ACCESS_DS_SOURCE_W equ "DS"
ACCESS_DS_SOURCE equ "DS"
;ACCESS_DS_OBJECT_TYPE_NAME_A equ "Directory Service Object"
;ACCESS_DS_OBJECT_TYPE_NAME_W equ "Directory Service Object"
ACCESS_DS_OBJECT_TYPE_NAME equ "Directory Service Object"

SE_CREATE_TOKEN_NAME equ "SeCreateTokenPrivilege"
SE_ASSIGNPRIMARYTOKEN_NAME equ "SeAssignPrimaryTokenPrivilege"
SE_LOCK_MEMORY_NAME equ "SeLockMemoryPrivilege"
SE_INCREASE_QUOTA_NAME equ "SeIncreaseQuotaPrivilege"
SE_UNSOLICITED_INPUT_NAME equ "SeUnsolicitedInputPrivilege"
SE_MACHINE_ACCOUNT_NAME equ "SeMachineAccountPrivilege"
SE_TCB_NAME equ "SeTcbPrivilege"
SE_SECURITY_NAME equ "SeSecurityPrivilege"
SE_TAKE_OWNERSHIP_NAME equ "SeTakeOwnershipPrivilege"
SE_LOAD_DRIVER_NAME equ "SeLoadDriverPrivilege"
SE_SYSTEM_PROFILE_NAME equ "SeSystemProfilePrivilege"
SE_SYSTEMTIME_NAME equ "SeSystemtimePrivilege"
SE_PROF_SINGLE_PROCESS_NAME equ "SeProfileSingleProcessPrivilege"
SE_INC_BASE_PRIORITY_NAME equ "SeIncreaseBasePriorityPrivilege"
SE_CREATE_PAGEFILE_NAME equ "SeCreatePagefilePrivilege"
SE_CREATE_PERMANENT_NAME equ "SeCreatePermanentPrivilege"
SE_BACKUP_NAME equ "SeBackupPrivilege"
SE_RESTORE_NAME equ "SeRestorePrivilege"
SE_SHUTDOWN_NAME equ "SeShutdownPrivilege"
SE_DEBUG_NAME equ "SeDebugPrivilege"
SE_AUDIT_NAME equ "SeAuditPrivilege"
SE_SYSTEM_ENVIRONMENT_NAME equ "SeSystemEnvironmentPrivilege"
SE_CHANGE_NOTIFY_NAME equ "SeChangeNotifyPrivilege"
SE_REMOTE_SHUTDOWN_NAME equ "SeRemoteShutdownPrivilege"

TOKEN_ASSIGN_PRIMARY = (0001h)
TOKEN_DUPLICATE = (0002h)
TOKEN_IMPERSONATE = (0004h)
TOKEN_QUERY = (0008h)
TOKEN_QUERY_SOURCE = (0010h)
TOKEN_ADJUST_GROUPS = (0040h)
TOKEN_ADJUST_DEFAULT = (0080h)
TOKEN_ADJUST_SESSIONID = (0100h)
TOKEN_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED+TOKEN_ASSIGN_PRIMARY+TOKEN_DUPLICATE+TOKEN_IMPERSONATE+TOKEN_QUERY+TOKEN_QUERY_SOURCE+TOKEN_ADJUST_PRIVILEGES+TOKEN_ADJUST_GROUPS+TOKEN_ADJUST_SESSIONID+TOKEN_ADJUST_DEFAULT)
TOKEN_READ = (STANDARD_RIGHTS_READ+TOKEN_QUERY)
TOKEN_WRITE = (STANDARD_RIGHTS_WRITE+TOKEN_ADJUST_PRIVILEGES+TOKEN_ADJUST_GROUPS+TOKEN_ADJUST_DEFAULT)
TOKEN_EXECUTE = (STANDARD_RIGHTS_EXECUTE)
TOKEN_SOURCE_LENGTH = 8
SECURITY_DYNAMIC_TRACKING = TRUE
SECURITY_STATIC_TRACKING = FALSE
OWNER_SECURITY_INFORMATION = (00000001h)
GROUP_SECURITY_INFORMATION = (00000002h)
DACL_SECURITY_INFORMATION = (00000004h)
SACL_SECURITY_INFORMATION = (00000008h)
PROCESS_TERMINATE = (0001h)
PROCESS_CREATE_THREAD = (0002h)
PROCESS_SET_SESSIONID = (0004h)
PROCESS_VM_OPERATION = (0008h)
PROCESS_VM_READ = (0010h)
PROCESS_VM_WRITE = (0020h)
PROCESS_DUP_HANDLE = (0040h)
PROCESS_CREATE_PROCESS = (0080h)
PROCESS_SET_QUOTA = (0100h)
PROCESS_SET_INFORMATION = (0200h)
PROCESS_QUERY_INFORMATION = (0400h)
PROCESS_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED + SYNCHRONIZE + 0FFFh)
MAXIMUM_PROCESSORS = 32
THREAD_TERMINATE = (0001h)
THREAD_SUSPEND_RESUME = (0002h)
THREAD_GET_CONTEXT = (0008h)
THREAD_SET_CONTEXT = (0010h)
THREAD_SET_INFORMATION = (0020h)
THREAD_QUERY_INFORMATION = (0040h)
THREAD_SET_THREAD_TOKEN = (0080h)
THREAD_IMPERSONATE = (0100h)
THREAD_DIRECT_IMPERSONATION = (0200h)
THREAD_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED + SYNCHRONIZE +  3FFh)

JOB_OBJECT_ASSIGN_PROCESS = (0001h)
JOB_OBJECT_SET_ATTRIBUTES = (0002h)
JOB_OBJECT_QUERY = (0004h)
JOB_OBJECT_TERMINATE = (0008h)
JOB_OBJECT_SET_SECURITY_ATTRIBUTES = (0010h)
JOB_OBJECT_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED + SYNCHRONIZE +   1Fh )

TLS_MINIMUM_AVAILABLE = 64
EVENT_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED+SYNCHRONIZE+3h)
MUTANT_QUERY_STATE = 0001h
MUTANT_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED+SYNCHRONIZE+ MUTANT_QUERY_STATE)
SEMAPHORE_MODIFY_STATE = 0002h
SEMAPHORE_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED+SYNCHRONIZE+3h)
TIMER_QUERY_STATE = 0001h
TIMER_MODIFY_STATE = 0002h
TIMER_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED+SYNCHRONIZE+TIMER_QUERY_STATE+TIMER_MODIFY_STATE)
TIME_ZONE_ID_UNKNOWN = 0
TIME_ZONE_ID_STANDARD = 1
TIME_ZONE_ID_DAYLIGHT = 2
PROCESSOR_PPC_601 = 601
PROCESSOR_PPC_603 = 603
PROCESSOR_PPC_604 = 604
PROCESSOR_PPC_620 = 620
PROCESSOR_HITACHI_SH3 = 10003
PROCESSOR_HITACHI_SH3E = 10004
PROCESSOR_HITACHI_SH4 = 10005
PROCESSOR_MOTOROLA_821 = 821
PROCESSOR_SHx_SH3 = 103
PROCESSOR_SHx_SH4 = 104
PROCESSOR_STRONGARM = 2577
PROCESSOR_ARM720 = 1824
PROCESSOR_ARM820 = 2080
PROCESSOR_ARM920 = 2336
PROCESSOR_ARM_7TDMI = 70001
PROCESSOR_ARCHITECTURE_INTEL = 0
PROCESSOR_ARCHITECTURE_MIPS = 1
PROCESSOR_ARCHITECTURE_ALPHA = 2
PROCESSOR_ARCHITECTURE_PPC = 3
PROCESSOR_ARCHITECTURE_SHX = 4
PROCESSOR_ARCHITECTURE_ARM = 5
PROCESSOR_ARCHITECTURE_IA64 = 6
PROCESSOR_ARCHITECTURE_ALPHA64 = 7
PROCESSOR_ARCHITECTURE_UNKNOWN = 0FFFFh
PF_FLOATING_POINT_PRECISION_ERRATA = 0
PF_FLOATING_POINT_EMULATED = 1
PF_COMPARE_EXCHANGE_DOUBLE = 2
PF_MMX_INSTRUCTIONS_AVAILABLE = 3
PF_PPC_MOVEMEM_64BIT_OK = 4
PF_ALPHA_BYTE_INSTRUCTIONS = 5
PF_XMMI_INSTRUCTIONS_AVAILABLE = 6
PF_AMD3D_INSTRUCTIONS_AVAILABLE = 7
SYSTEM_FLAG_REMOTE_BOOT_CLIENT = 00000001h
SYSTEM_FLAG_DISKLESS_CLIENT = 00000002h
SECTION_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED+SECTION_QUERY+SECTION_MAP_WRITE+SECTION_MAP_READ+SECTION_MAP_EXECUTE+SECTION_EXTEND_SIZE)
PAGE_WRITECOMBINE = 400h
MEM_4MB_PAGES = 80000000h
SEC_VLM = 2000000h
FILE_GENERIC_READ = (STANDARD_RIGHTS_READ+FILE_READ_DATA+FILE_READ_ATTRIBUTES+FILE_READ_EA+SYNCHRONIZE)
FILE_GENERIC_WRITE = (STANDARD_RIGHTS_WRITE+FILE_WRITE_DATA+FILE_WRITE_ATTRIBUTES+FILE_WRITE_EA+FILE_APPEND_DATA+SYNCHRONIZE)
FILE_GENERIC_EXECUTE = (STANDARD_RIGHTS_EXECUTE+FILE_READ_ATTRIBUTES+FILE_EXECUTE+SYNCHRONIZE)
FILE_SHARE_DELETE = 00000004h
FILE_ATTRIBUTE_SPARSE_FILE = 00000200h
FILE_ATTRIBUTE_REPARSE_POINT = 00000400h
FILE_ATTRIBUTE_OFFLINE = 00001000h
FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 00002000h
FILE_ATTRIBUTE_ENCRYPTED = 00004000h
FILE_NOTIFY_CHANGE_LAST_ACCESS = 00000020h
FILE_NOTIFY_CHANGE_CREATION = 00000040h
FILE_ACTION_ADDED = 00000001h
FILE_ACTION_REMOVED = 00000002h
FILE_ACTION_MODIFIED = 00000003h
FILE_ACTION_RENAMED_OLD_NAME = 00000004h
FILE_ACTION_RENAMED_NEW_NAME = 00000005h
FILE_VOLUME_QUOTAS = 00000020h
FILE_SUPPORTS_SPARSE_FILES = 00000040h
FILE_SUPPORTS_REPARSE_POINTS = 00000080h
FILE_SUPPORTS_REMOTE_STORAGE = 00000100h
FILE_SUPPORTS_OBJECT_IDS = 00010000h
FILE_SUPPORTS_ENCRYPTION = 00020000h
MAXIMUM_REPARSE_DATA_BUFFER_SIZE = ( 16 * 1024 )
IO_REPARSE_TAG_RESERVED_ZERO = (0)
IO_REPARSE_TAG_RESERVED_ONE = (1)
IO_REPARSE_TAG_RESERVED_RANGE = IO_REPARSE_TAG_RESERVED_ONE
IO_REPARSE_TAG_VALID_VALUES = (0E000FFFFh)
IO_REPARSE_TAG_SYMBOLIC_LINK = IO_REPARSE_TAG_RESERVED_ZERO
IO_REPARSE_TAG_MOUNT_POINT = (0A0000003h)
IO_REPARSE_TAG_HSM = (0C0000004h)
IO_REPARSE_TAG_NSS = (80000005h)
IO_REPARSE_TAG_NSSRECOVER = (80000006h)
IO_REPARSE_TAG_SIS = (80000007h)
IO_REPARSE_TAG_DFS = (80000008h)
ES_SYSTEM_REQUIRED = (00000001h)
ES_DISPLAY_REQUIRED = (00000002h)
ES_USER_PRESENT = (00000004h)
ES_CONTINUOUS = (80000000h)
IMAGE_DOS_SIGNATURE = 5A4Dh
IMAGE_OS2_SIGNATURE = 454Eh
IMAGE_OS2_SIGNATURE_LE = 454Ch
IMAGE_VXD_SIGNATURE = 454Ch
IMAGE_NT_SIGNATURE = 00004550h
IMAGE_SIZEOF_FILE_HEADER = 20
IMAGE_FILE_RELOCS_STRIPPED = 0001h
IMAGE_FILE_EXECUTABLE_IMAGE = 0002h
IMAGE_FILE_LINE_NUMS_STRIPPED = 0004h
IMAGE_FILE_LOCAL_SYMS_STRIPPED = 0008h
IMAGE_FILE_AGGRESIVE_WS_TRIM = 0010h
IMAGE_FILE_LARGE_ADDRESS_AWARE = 0020h
IMAGE_FILE_BYTES_REVERSED_LO = 0080h
IMAGE_FILE_32BIT_MACHINE = 0100h
IMAGE_FILE_DEBUG_STRIPPED = 0200h
IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP = 0400h
IMAGE_FILE_NET_RUN_FROM_SWAP = 0800h
IMAGE_FILE_SYSTEM = 1000h
IMAGE_FILE_DLL = 2000h
IMAGE_FILE_UP_SYSTEM_ONLY = 4000h
IMAGE_FILE_BYTES_REVERSED_HI = 8000h
IMAGE_FILE_MACHINE_UNKNOWN = 0
IMAGE_FILE_MACHINE_I386 = 014ch
IMAGE_FILE_MACHINE_R3000 = 0162h
IMAGE_FILE_MACHINE_R4000 = 0166h
IMAGE_FILE_MACHINE_R10000 = 0168h
IMAGE_FILE_MACHINE_WCEMIPSV2 = 0169h
IMAGE_FILE_MACHINE_ALPHA = 0184h
IMAGE_FILE_MACHINE_POWERPC = 01F0h
IMAGE_FILE_MACHINE_SH3 = 01a2h
IMAGE_FILE_MACHINE_SH3E = 01a4h
IMAGE_FILE_MACHINE_SH4 = 01a6h
IMAGE_FILE_MACHINE_ARM = 01c0h
IMAGE_FILE_MACHINE_THUMB = 01c2h
IMAGE_FILE_MACHINE_IA64 = 0200h
IMAGE_FILE_MACHINE_MIPS16 = 0266h
IMAGE_FILE_MACHINE_MIPSFPU = 0366h
IMAGE_FILE_MACHINE_MIPSFPU16 = 0466h
IMAGE_FILE_MACHINE_ALPHA64 = 0284h
IMAGE_FILE_MACHINE_AXP64 = IMAGE_FILE_MACHINE_ALPHA64
IMAGE_SIZEOF_ROM_OPTIONAL_HEADER = 56
IMAGE_SIZEOF_STD_OPTIONAL_HEADER = 28
IMAGE_SIZEOF_NT_OPTIONAL32_HEADER = 224
IMAGE_SIZEOF_NT_OPTIONAL64_HEADER = 240
IMAGE_NT_OPTIONAL_HDR32_MAGIC = 10bh
IMAGE_NT_OPTIONAL_HDR64_MAGIC = 20bh
IMAGE_ROM_OPTIONAL_HDR_MAGIC = 107h
IMAGE_SUBSYSTEM_UNKNOWN = 0
IMAGE_SUBSYSTEM_NATIVE = 1
IMAGE_SUBSYSTEM_WINDOWS_GUI = 2
IMAGE_SUBSYSTEM_WINDOWS_CUI = 3
IMAGE_SUBSYSTEM_OS2_CUI = 5
IMAGE_SUBSYSTEM_POSIX_CUI = 7
IMAGE_SUBSYSTEM_NATIVE_WINDOWS = 8
IMAGE_SUBSYSTEM_WINDOWS_CE_GUI = 9
IMAGE_DLLCHARACTERISTICS_WDM_DRIVER = 2000h
IMAGE_DIRECTORY_ENTRY_ARCHITECTURE = 7
IMAGE_DIRECTORY_ENTRY_DELAY_IMPORT = 13
IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR = 14
IMAGE_SIZEOF_SHORT_NAME = 8
IMAGE_SCN_TYPE_NO_PAD = 00000008h
IMAGE_SCN_CNT_CODE = 00000020h
IMAGE_SCN_CNT_INITIALIZED_DATA = 00000040h
IMAGE_SCN_CNT_UNINITIALIZED_DATA = 00000080h
IMAGE_SCN_LNK_OTHER = 00000100h
IMAGE_SCN_LNK_INFO = 00000200h
IMAGE_SCN_LNK_REMOVE = 00000800h
IMAGE_SCN_LNK_COMDAT = 00001000h
IMAGE_SCN_NO_DEFER_SPEC_EXC = 00004000h
IMAGE_SCN_GPREL = 00008000h
IMAGE_SCN_MEM_FARDATA = 00008000h
IMAGE_SCN_MEM_PURGEABLE = 00020000h
IMAGE_SCN_MEM_16BIT = 00020000h
IMAGE_SCN_MEM_LOCKED = 00040000h
IMAGE_SCN_MEM_PRELOAD = 00080000h
IMAGE_SCN_ALIGN_1BYTES = 00100000h
IMAGE_SCN_ALIGN_2BYTES = 00200000h
IMAGE_SCN_ALIGN_4BYTES = 00300000h
IMAGE_SCN_ALIGN_8BYTES = 00400000h
IMAGE_SCN_ALIGN_16BYTES = 00500000h
IMAGE_SCN_ALIGN_32BYTES = 00600000h
IMAGE_SCN_ALIGN_64BYTES = 00700000h
IMAGE_SCN_ALIGN_128BYTES = 00800000h
IMAGE_SCN_ALIGN_256BYTES = 00900000h
IMAGE_SCN_ALIGN_512BYTES = 00A00000h
IMAGE_SCN_ALIGN_1024BYTES = 00B00000h
IMAGE_SCN_ALIGN_2048BYTES = 00C00000h
IMAGE_SCN_ALIGN_4096BYTES = 00D00000h
IMAGE_SCN_ALIGN_8192BYTES = 00E00000h
IMAGE_SCN_LNK_NRELOC_OVFL = 01000000h
IMAGE_SCN_MEM_DISCARDABLE = 02000000h
IMAGE_SCN_MEM_NOT_CACHED = 04000000h
IMAGE_SCN_MEM_NOT_PAGED = 08000000h
IMAGE_SCN_MEM_SHARED = 10000000h
IMAGE_SCN_MEM_EXECUTE = 20000000h
IMAGE_SCN_MEM_READ = 40000000h
IMAGE_SCN_MEM_WRITE = 80000000h
IMAGE_SCN_SCALE_INDEX = 00000001h
IMAGE_SIZEOF_SYMBOL = 18
IMAGE_SYM_UNDEFINED = 0
IMAGE_SYM_ABSOLUTE = -1
IMAGE_SYM_DEBUG = -2
IMAGE_SYM_TYPE_NULL = 0000h
IMAGE_SYM_TYPE_VOID = 0001h
IMAGE_SYM_TYPE_CHAR = 0002h
IMAGE_SYM_TYPE_SHORT = 0003h
IMAGE_SYM_TYPE_INT = 0004h
IMAGE_SYM_TYPE_LONG = 0005h
IMAGE_SYM_TYPE_FLOAT = 0006h
IMAGE_SYM_TYPE_DOUBLE = 0007h
IMAGE_SYM_TYPE_struct = 0008h
IMAGE_SYM_TYPE_UNION = 0009h
IMAGE_SYM_TYPE_ENUM = 000Ah
IMAGE_SYM_TYPE_MOE = 000Bh
IMAGE_SYM_TYPE_BYTE = 000Ch
IMAGE_SYM_TYPE_WORD = 000Dh
IMAGE_SYM_TYPE_UINT = 000Eh
IMAGE_SYM_TYPE_DWORD = 000Fh
IMAGE_SYM_TYPE_PCODE = 8000h
IMAGE_SYM_DTYPE_NULL = 0
IMAGE_SYM_DTYPE_POINTER = 1
IMAGE_SYM_DTYPE_FUNCTION = 2
IMAGE_SYM_DTYPE_ARRAY = 3
IMAGE_SYM_CLASS_END_OF_FUNCTION = -1
IMAGE_SYM_CLASS_NULL = 0000h
IMAGE_SYM_CLASS_AUTOMATIC = 0001h
IMAGE_SYM_CLASS_EXTERNAL = 0002h
IMAGE_SYM_CLASS_STATIC = 0003h
IMAGE_SYM_CLASS_REGISTER = 0004h
IMAGE_SYM_CLASS_EXTERNAL_DEF = 0005h
IMAGE_SYM_CLASS_LABEL = 0006h
IMAGE_SYM_CLASS_UNDEFINED_LABEL = 0007h
IMAGE_SYM_CLASS_MEMBER_OF_struct = 0008h
IMAGE_SYM_CLASS_ARGUMENT = 0009h
IMAGE_SYM_CLASS_struct_TAG = 000Ah
IMAGE_SYM_CLASS_MEMBER_OF_UNION = 000Bh
IMAGE_SYM_CLASS_UNION_TAG = 000Ch
IMAGE_SYM_CLASS_TYPE_DEFINITION = 000Dh
IMAGE_SYM_CLASS_UNDEFINED_STATIC = 000Eh
IMAGE_SYM_CLASS_ENUM_TAG = 000Fh
IMAGE_SYM_CLASS_MEMBER_OF_ENUM = 0010h
IMAGE_SYM_CLASS_REGISTER_PARAM = 0011h
IMAGE_SYM_CLASS_BIT_FIELD = 0012h
IMAGE_SYM_CLASS_FAR_EXTERNAL = 0044h
IMAGE_SYM_CLASS_BLOCK = 0064h
IMAGE_SYM_CLASS_FUNCTION = 0065h
IMAGE_SYM_CLASS_END_OF_struct = 0066h
IMAGE_SYM_CLASS_FILE = 0067h
IMAGE_SYM_CLASS_SECTION = 0068h
IMAGE_SYM_CLASS_WEAK_EXTERNAL = 0069h
N_BTMASK = 000Fh
N_TMASK = 0030h
N_TMASK1 = 00C0h
N_TMASK2 = 00F0h
N_BTSHFT = 4
N_TSHIFT = 2
IMAGE_SIZEOF_AUX_SYMBOL = 18
IMAGE_COMDAT_SELECT_NODUPLICATES = 1
IMAGE_COMDAT_SELECT_ANY = 2
IMAGE_COMDAT_SELECT_SAME_SIZE = 3
IMAGE_COMDAT_SELECT_EXACT_MATCH = 4
IMAGE_COMDAT_SELECT_ASSOCIATIVE = 5
IMAGE_COMDAT_SELECT_LARGEST = 6
IMAGE_COMDAT_SELECT_NEWEST = 7
IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY = 1
IMAGE_WEAK_EXTERN_SEARCH_LIBRARY = 2
IMAGE_WEAK_EXTERN_SEARCH_ALIAS = 3
IMAGE_SIZEOF_RELOCATION = 10
IMAGE_REL_I386_ABSOLUTE = 0000h
IMAGE_REL_I386_DIR16 = 0001h
IMAGE_REL_I386_REL16 = 0002h
IMAGE_REL_I386_DIR32 = 0006h
IMAGE_REL_I386_DIR32NB = 0007h
IMAGE_REL_I386_SEG12 = 0009h
IMAGE_REL_I386_SECTION = 000Ah
IMAGE_REL_I386_SECREL = 000Bh
IMAGE_REL_I386_REL32 = 0014h
IMAGE_SIZEOF_LINENUMBER = 6
IMAGE_SIZEOF_BASE_RELOCATION = 8
IMAGE_REL_BASED_ABSOLUTE = 0
IMAGE_REL_BASED_HIGH = 1
IMAGE_REL_BASED_LOW = 2
IMAGE_REL_BASED_HIGHLOW = 3
IMAGE_REL_BASED_HIGHADJ = 4
IMAGE_REL_BASED_MIPS_JMPADDR = 5
IMAGE_REL_BASED_SECTION = 6
IMAGE_REL_BASED_REL32 = 7
IMAGE_REL_BASED_MIPS_JMPADDR16 = 9
IMAGE_REL_BASED_IA64_IMM64 = 9
IMAGE_REL_BASED_DIR64 = 10
IMAGE_REL_BASED_HIGH3ADJ = 11
IMAGE_ARCHIVE_START_SIZE = 8
IMAGE_ARCHIVE_START equ "!<arch>",10;A
IMAGE_ARCHIVE_END equ "`",10;A
IMAGE_ARCHIVE_PAD equ 10;A
IMAGE_ARCHIVE_LINKER_MEMBER equ "/               ";A
IMAGE_ARCHIVE_LONGNAMES_MEMBER equ "//              ";A
IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR = 60
IMAGE_ORDINAL_FLAG32 = 80000000h
IMAGE_RESOURCE_NAME_IS_STRING = 80000000h
IMAGE_RESOURCE_DATA_IS_DIRECTORY = 80000000h
IMAGE_DEBUG_TYPE_UNKNOWN = 0
IMAGE_DEBUG_TYPE_COFF = 1
IMAGE_DEBUG_TYPE_CODEVIEW = 2
IMAGE_DEBUG_TYPE_FPO = 3
IMAGE_DEBUG_TYPE_MISC = 4
IMAGE_DEBUG_TYPE_EXCEPTION = 5
IMAGE_DEBUG_TYPE_FIXUP = 6
IMAGE_DEBUG_TYPE_OMAP_TO_SRC = 7
IMAGE_DEBUG_TYPE_OMAP_FROM_SRC = 8
IMAGE_DEBUG_TYPE_BORLAND = 9
IMAGE_DEBUG_TYPE_RESERVED10 = 10
FRAME_FPO = 0
FRAME_TRAP = 1
FRAME_TSS = 2
FRAME_NONFPO = 3
SIZEOF_RFPO_DATA = 16
IMAGE_DEBUG_MISC_EXENAME = 1
IMAGE_SEPARATE_DEBUG_SIGNATURE = 4944h
IMAGE_SEPARATE_DEBUG_FLAGS_MASK = 8000h
IMAGE_SEPARATE_DEBUG_MISMATCH = 8000h
HEAP_NO_SERIALIZE = 00000001h
HEAP_GROWABLE = 00000002h
HEAP_GENERATE_EXCEPTIONS = 00000004h
HEAP_ZERO_MEMORY = 00000008h
HEAP_REALLOC_IN_PLACE_ONLY = 00000010h
HEAP_TAIL_CHECKING_ENABLED = 00000020h
HEAP_FREE_CHECKING_ENABLED = 00000040h
HEAP_DISABLE_COALESCE_ON_FREE = 00000080h
HEAP_CREATE_ALIGN_16 = 00010000h
HEAP_CREATE_ENABLE_TRACING = 00020000h
HEAP_MAXIMUM_TAG = 0FFFh
HEAP_PSEUDO_TAG_FLAG = 8000h
HEAP_TAG_SHIFT = 18
IS_TEXT_UNICODE_ASCII16 = 0001h
IS_TEXT_UNICODE_REVERSE_ASCII16 = 0010h
IS_TEXT_UNICODE_STATISTICS = 0002h
IS_TEXT_UNICODE_REVERSE_STATISTICS = 0020h
IS_TEXT_UNICODE_CONTROLS = 0004h
IS_TEXT_UNICODE_REVERSE_CONTROLS = 0040h
IS_TEXT_UNICODE_SIGNATURE = 0008h
IS_TEXT_UNICODE_REVERSE_SIGNATURE = 0080h
IS_TEXT_UNICODE_ILLEGAL_CHARS = 0100h
IS_TEXT_UNICODE_ODD_LENGTH = 0200h
IS_TEXT_UNICODE_DBCS_LEADBYTE = 0400h
IS_TEXT_UNICODE_NULL_BYTES = 1000h
IS_TEXT_UNICODE_UNICODE_MASK = 000Fh
IS_TEXT_UNICODE_REVERSE_MASK = 00F0h
IS_TEXT_UNICODE_NOT_UNICODE_MASK = 0F00h
IS_TEXT_UNICODE_NOT_ASCII_MASK = 0F000h
COMPRESSION_FORMAT_NONE = (0000h)
COMPRESSION_FORMAT_DEFAULT = (0001h)
COMPRESSION_FORMAT_LZNT1 = (0002h)
COMPRESSION_ENGINE_STANDARD = (0000h)
COMPRESSION_ENGINE_MAXIMUM = (0100h)
MESSAGE_RESOURCE_UNICODE = 0001h
RTL_CRITSECT_TYPE = 0
RTL_RESOURCE_TYPE = 1
SEF_DACL_AUTO_INHERIT = 1h
SEF_SACL_AUTO_INHERIT = 2h
SEF_DEFAULT_DESCRIPTOR_FOR_OBJECT = 4h
SEF_AVOID_PRIVILEGE_CHECK = 8h
WT_EXECUTEDEFAULT = 00000000h
WT_EXECUTEINIOTHREAD = 00000001h
WT_EXECUTEINUITHREAD = 00000002h
WT_EXECUTEINWAITTHREAD = 00000004h
WT_EXECUTEDELETEWAIT = 00000008h
WT_EXECUTEINLONGTHREAD = 00000010h
EVENTLOG_SEQUENTIAL_READ = 0001h
EVENTLOG_SEEK_READ = 0002h
EVENTLOG_FORWARDS_READ = 0004h
EVENTLOG_BACKWARDS_READ = 0008h
EVENTLOG_SUCCESS = 0000h
EVENTLOG_ERROR_TYPE = 0001h
EVENTLOG_WARNING_TYPE = 0002h
EVENTLOG_INFORMATION_TYPE = 0004h
EVENTLOG_AUDIT_SUCCESS = 0008h
EVENTLOG_AUDIT_FAILURE = 0010h
EVENTLOG_START_PAIRED_EVENT = 0001h
EVENTLOG_END_PAIRED_EVENT = 0002h
EVENTLOG_END_ALL_PAIRED_EVENTS = 0004h
EVENTLOG_PAIRED_EVENT_ACTIVE = 0008h
EVENTLOG_PAIRED_EVENT_INACTIVE = 0010h
MAXLOGICALLOGNAMESIZE = 256
REG_OPTION_OPEN_LINK = (00000008h)
REG_NO_LAZY_FLUSH = (00000004h)
SERVICE_KERNEL_DRIVER = 00000001h
SERVICE_FILE_SYSTEM_DRIVER = 00000002h
SERVICE_ADAPTER = 00000004h
SERVICE_RECOGNIZER_DRIVER = 00000008h
SERVICE_DRIVER = (SERVICE_KERNEL_DRIVER + SERVICE_FILE_SYSTEM_DRIVER + SERVICE_RECOGNIZER_DRIVER)
SERVICE_WIN32_OWN_PROCESS = 00000010h
SERVICE_WIN32_SHARE_PROCESS = 00000020h
SERVICE_WIN32 = (SERVICE_WIN32_OWN_PROCESS + SERVICE_WIN32_SHARE_PROCESS)
SERVICE_INTERACTIVE_PROCESS = 00000100h
SERVICE_TYPE_ALL = (SERVICE_WIN32+SERVICE_ADAPTER + SERVICE_DRIVER  + SERVICE_INTERACTIVE_PROCESS)
SERVICE_BOOT_START = 00000000h
SERVICE_SYSTEM_START = 00000001h
SERVICE_AUTO_START = 00000002h
SERVICE_DEMAND_START = 00000003h
SERVICE_DISABLED = 00000004h
SERVICE_ERROR_IGNORE = 00000000h
SERVICE_ERROR_NORMAL = 00000001h
SERVICE_ERROR_SEVERE = 00000002h
SERVICE_ERROR_CRITICAL = 00000003h
TAPE_ERASE_SHORT = 0
TAPE_ERASE_LONG = 1
TAPE_LOAD = 0
TAPE_UNLOAD = 1
TAPE_TENSION = 2
TAPE_LOCK = 3
TAPE_UNLOCK = 4
TAPE_FORMAT = 5
TAPE_SETMARKS = 0
TAPE_FILEMARKS = 1
TAPE_SHORT_FILEMARKS = 2
TAPE_LONG_FILEMARKS = 3
TAPE_ABSOLUTE_POSITION = 0
TAPE_LOGICAL_POSITION = 1
TAPE_PSEUDO_LOGICAL_POSITION = 2
TAPE_REWIND = 0
TAPE_ABSOLUTE_BLOCK = 1
TAPE_LOGICAL_BLOCK = 2
TAPE_PSEUDO_LOGICAL_BLOCK = 3
TAPE_SPACE_END_OF_DATA = 4
TAPE_SPACE_RELATIVE_BLOCKS = 5
TAPE_SPACE_FILEMARKS = 6
TAPE_SPACE_SEQUENTIAL_FMKS = 7
TAPE_SPACE_SETMARKS = 8
TAPE_SPACE_SEQUENTIAL_SMKS = 9
TAPE_DRIVE_FIXED = 00000001h
TAPE_DRIVE_SELECT = 00000002h
TAPE_DRIVE_INITIATOR = 00000004h
TAPE_DRIVE_ERASE_SHORT = 00000010h
TAPE_DRIVE_ERASE_LONG = 00000020h
TAPE_DRIVE_ERASE_BOP_ONLY = 00000040h
TAPE_DRIVE_ERASE_IMMEDIATE = 00000080h
TAPE_DRIVE_TAPE_CAPACITY = 00000100h
TAPE_DRIVE_TAPE_REMAINING = 00000200h
TAPE_DRIVE_FIXED_BLOCK = 00000400h
TAPE_DRIVE_VARIABLE_BLOCK = 00000800h
TAPE_DRIVE_WRITE_PROTECT = 00001000h
TAPE_DRIVE_EOT_WZ_SIZE = 00002000h
TAPE_DRIVE_ECC = 00010000h
TAPE_DRIVE_COMPRESSION = 00020000h
TAPE_DRIVE_PADDING = 00040000h
TAPE_DRIVE_REPORT_SMKS = 00080000h
TAPE_DRIVE_GET_ABSOLUTE_BLK = 00100000h
TAPE_DRIVE_GET_LOGICAL_BLK = 00200000h
TAPE_DRIVE_SET_EOT_WZ_SIZE = 00400000h
TAPE_DRIVE_EJECT_MEDIA = 01000000h
TAPE_DRIVE_CLEAN_REQUESTS = 02000000h
TAPE_DRIVE_SET_CMP_BOP_ONLY = 04000000h
TAPE_DRIVE_RESERVED_BIT = 80000000h
TAPE_DRIVE_LOAD_UNLOAD = 80000001h
TAPE_DRIVE_TENSION = 80000002h
TAPE_DRIVE_LOCK_UNLOCK = 80000004h
TAPE_DRIVE_REWIND_IMMEDIATE = 80000008h
TAPE_DRIVE_SET_BLOCK_SIZE = 80000010h
TAPE_DRIVE_LOAD_UNLD_IMMED = 80000020h
TAPE_DRIVE_TENSION_IMMED = 80000040h
TAPE_DRIVE_LOCK_UNLK_IMMED = 80000080h
TAPE_DRIVE_SET_ECC = 80000100h
TAPE_DRIVE_SET_COMPRESSION = 80000200h
TAPE_DRIVE_SET_PADDING = 80000400h
TAPE_DRIVE_SET_REPORT_SMKS = 80000800h
TAPE_DRIVE_ABSOLUTE_BLK = 80001000h
TAPE_DRIVE_ABS_BLK_IMMED = 80002000h
TAPE_DRIVE_LOGICAL_BLK = 80004000h
TAPE_DRIVE_LOG_BLK_IMMED = 80008000h
TAPE_DRIVE_END_OF_DATA = 80010000h
TAPE_DRIVE_RELATIVE_BLKS = 80020000h
TAPE_DRIVE_FILEMARKS = 80040000h
TAPE_DRIVE_SEQUENTIAL_FMKS = 80080000h
TAPE_DRIVE_SETMARKS = 80100000h
TAPE_DRIVE_SEQUENTIAL_SMKS = 80200000h
TAPE_DRIVE_REVERSE_POSITION = 80400000h
TAPE_DRIVE_SPACE_IMMEDIATE = 80800000h
TAPE_DRIVE_WRITE_SETMARKS = 81000000h
TAPE_DRIVE_WRITE_FILEMARKS = 82000000h
TAPE_DRIVE_WRITE_SHORT_FMKS = 84000000h
TAPE_DRIVE_WRITE_LONG_FMKS = 88000000h
TAPE_DRIVE_WRITE_MARK_IMMED = 090000000h
TAPE_DRIVE_FORMAT = 0A0000000h
TAPE_DRIVE_FORMAT_IMMEDIATE = 0C0000000h
TAPE_DRIVE_HIGH_FEATURES = 80000000h
IMPORT_OBJECT_HDR_SIG2 = 0ffffh
TAPE_FIXED_PARTITIONS = 0
TAPE_SELECT_PARTITIONS = 1
TAPE_INITIATOR_PARTITIONS = 2


DriverType               = SERVICE_KERNEL_DRIVER
FileSystemType           = SERVICE_FILE_SYSTEM_DRIVER
Win32ServiceOwnProcess   = SERVICE_WIN32_OWN_PROCESS
Win32ServiceShareProcess = SERVICE_WIN32_SHARE_PROCESS
AdapterType              = SERVICE_ADAPTER
RecognizerType           = SERVICE_RECOGNIZER_DRIVER

BootLoad    = SERVICE_BOOT_START
SystemLoad  = SERVICE_SYSTEM_START
AutoLoad    = SERVICE_AUTO_START
DemandLoad  = SERVICE_DEMAND_START
DisableLoad = SERVICE_DISABLED

IgnoreError   = SERVICE_ERROR_IGNORE
NormalError   = SERVICE_ERROR_NORMAL
SevereError   = SERVICE_ERROR_SEVERE
CriticalError = SERVICE_ERROR_CRITICAL

IMPORT_OBJECT_CODE      = 0
IMPORT_OBJECT_DATA      = 1
IMPORT_OBJECT_CONST     = 2

IMPORT_OBJECT_ORDINAL   = 0
IMPORT_OBJECT_NAME      = 1
IMPORT_OBJECT_NAME_NO_PREFIX =  2
IMPORT_OBJECT_NAME_UNDECORATE = 3

TYPEDEF EXECUTION_STATE, DWORD

LT_DONT_CARE            = 0
LT_LOWEST_LATENCY       = 1

TokenPrimary            = 1
TokenImpersonation      = 2

TokenRestrictedSids     = 11
TokenSessionId          = 12

AuditEventObjectAccess  = 0
AuditEventDirectoryServiceAccess = 1


SidTypeComputer         = 9

MEMORY_ALLOCATION_ALIGNMENT      = 16
SYSTEM_CACHE_ALIGNMENT_SIZE      = 64
PRAGMA_DEPRECATED_DDK            = 1
UCSCHAR_INVALID_CHARACTER        = 0ffffffffh
MIN_UCSCHAR                      = 0
MAX_UCSCHAR                      = 0010FFFFh
VER_SUITE_STORAGE_SERVER         = 00002000h
VER_SUITE_COMPUTE_SERVER         = 00004000h
PRODUCT_UNDEFINED                = 00000000h
PRODUCT_ULTIMATE                 = 00000001h
PRODUCT_HOME_BASIC               = 00000002h
PRODUCT_HOME_PREMIUM             = 00000003h
PRODUCT_ENTERPRISE               = 00000004h
PRODUCT_HOME_BASIC_N             = 00000005h
PRODUCT_BUSINESS                 = 00000006h
PRODUCT_STANDARD_SERVER          = 00000007h
PRODUCT_DATACENTER_SERVER        = 00000008h
PRODUCT_SMALLBUSINESS_SERVER     = 00000009h
PRODUCT_ENTERPRISE_SERVER        = 0000000Ah
PRODUCT_STARTER                  = 0000000Bh
PRODUCT_DATACENTER_SERVER_CORE   = 0000000Ch
PRODUCT_STANDARD_SERVER_CORE     = 0000000Dh
PRODUCT_ENTERPRISE_SERVER_CORE   = 0000000Eh
PRODUCT_ENTERPRISE_SERVER_IA64   = 0000000Fh
PRODUCT_BUSINESS_N               = 00000010h
PRODUCT_WEB_SERVER               = 00000011h
PRODUCT_CLUSTER_SERVER           = 00000012h
PRODUCT_HOME_SERVER              = 00000013h
PRODUCT_STORAGE_EXPRESS_SERVER   = 00000014h
PRODUCT_STORAGE_STANDARD_SERVER  = 00000015h
PRODUCT_STORAGE_WORKGROUP_SERVER = 00000016h
PRODUCT_STORAGE_ENTERPRISE_SERVER = 00000017h
PRODUCT_SERVER_FOR_SMALLBUSINESS = 00000018h
PRODUCT_SMALLBUSINESS_SERVER_PREMIUM = 00000019h
PRODUCT_UNLICENSED               = 0ABCDABCDh
LANG_ALSATIAN                    = 84h
LANG_AMHARIC                     = 5eh
LANG_BASHKIR                     = 6dh
LANG_BRETON                      = 7eh
LANG_BOSNIAN                     = 1ah
LANG_BOSNIAN_NEUTRAL             = 781ah
LANG_CHINESE_SIMPLIFIED          = 04h
LANG_CHINESE_TRADITIONAL         = 7c04h
LANG_CORSICAN                    = 83h
LANG_DARI                        = 8ch
LANG_FILIPINO                    = 64h
LANG_FRISIAN                     = 62h
LANG_GREENLANDIC                 = 6fh
LANG_HAUSA                       = 68h
LANG_IGBO                        = 70h
LANG_INUKTITUT                   = 5dh
LANG_IRISH                       = 3ch
LANG_KHMER                       = 53h
LANG_KICHE                       = 86h
LANG_KINYARWANDA                 = 87h
LANG_LAO                         = 54h
LANG_LOWER_SORBIAN               = 2eh
LANG_LUXEMBOURGISH               = 6eh
LANG_MALTESE                     = 3ah
LANG_MAORI                       = 81h
LANG_MAPUDUNGUN                  = 7ah
LANG_MOHAWK                      = 7ch
LANG_OCCITAN                     = 82h
LANG_PASHTO                      = 63h
LANG_PERSIAN                     = 29h
LANG_QUECHUA                     = 6bh
LANG_ROMANSH                     = 17h
LANG_SAMI                        = 3bh
LANG_SERBIAN_NEUTRAL             = 7c1ah
LANG_SINHALESE                   = 5bh
LANG_SOTHO                       = 6ch
LANG_TAJIK                       = 28h
LANG_TAMAZIGHT                   = 5fh
LANG_TIBETAN                     = 51h
LANG_TIGRIGNA                    = 73h
LANG_TSWANA                      = 32h
LANG_TURKMEN                     = 42h
LANG_UIGHUR                      = 80h
LANG_UPPER_SORBIAN               = 2eh
LANG_WELSH                       = 52h
LANG_WOLOF                       = 88h
LANG_XHOSA                       = 34h
LANG_YAKUT                       = 85h
LANG_YI                          = 78h
LANG_YORUBA                      = 6ah
LANG_ZULU                        = 35h
SUBLANG_CUSTOM_DEFAULT           = 03h
SUBLANG_CUSTOM_UNSPECIFIED       = 04h
SUBLANG_UI_CUSTOM_DEFAULT        = 05h
SUBLANG_AFRIKAANS_SOUTH_AFRICA   = 01h
SUBLANG_ALBANIAN_ALBANIA         = 01h
SUBLANG_ALSATIAN_FRANCE          = 01h
SUBLANG_AMHARIC_ETHIOPIA         = 01h
SUBLANG_ARMENIAN_ARMENIA         = 01h
SUBLANG_ASSAMESE_INDIA           = 01h
SUBLANG_BASHKIR_RUSSIA           = 01h
SUBLANG_BASQUE_BASQUE            = 01h
SUBLANG_BELARUSIAN_BELARUS       = 01h
SUBLANG_BENGALI_INDIA            = 01h
SUBLANG_BENGALI_BANGLADESH       = 02h
SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN = 05h
SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC = 08h
SUBLANG_BRETON_FRANCE            = 01h
SUBLANG_BULGARIAN_BULGARIA       = 01h
SUBLANG_CATALAN_CATALAN          = 01h
SUBLANG_CORSICAN_FRANCE          = 01h
SUBLANG_CZECH_CZECH_REPUBLIC     = 01h
SUBLANG_CROATIAN_CROATIA         = 01h
SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN = 04h
SUBLANG_DANISH_DENMARK           = 01h
SUBLANG_DARI_AFGHANISTAN         = 01h
SUBLANG_DIVEHI_MALDIVES          = 01h
SUBLANG_ENGLISH_INDIA            = 10h
SUBLANG_ENGLISH_MALAYSIA         = 11h
SUBLANG_ENGLISH_SINGAPORE        = 12h
SUBLANG_ESTONIAN_ESTONIA         = 01h
SUBLANG_FAEROESE_FAROE_ISLANDS   = 01h
SUBLANG_FILIPINO_PHILIPPINES     = 01h
SUBLANG_FINNISH_FINLAND          = 01h
SUBLANG_FRISIAN_NETHERLANDS      = 01h
SUBLANG_GALICIAN_GALICIAN        = 01h
SUBLANG_GEORGIAN_GEORGIA         = 01h
SUBLANG_GREEK_GREECE             = 01h
SUBLANG_GREENLANDIC_GREENLAND    = 01h
SUBLANG_GUJARATI_INDIA           = 01h
SUBLANG_HAUSA_NIGERIA_LATIN      = 01h
SUBLANG_HEBREW_ISRAEL            = 01h
SUBLANG_HINDI_INDIA              = 01h
SUBLANG_HUNGARIAN_HUNGARY        = 01h
SUBLANG_ICELANDIC_ICELAND        = 01h
SUBLANG_IGBO_NIGERIA             = 01h
SUBLANG_INDONESIAN_INDONESIA     = 01h
SUBLANG_INUKTITUT_CANADA         = 01h
SUBLANG_INUKTITUT_CANADA_LATIN   = 02h
SUBLANG_IRISH_IRELAND            = 02h
SUBLANG_JAPANESE_JAPAN           = 01h
SUBLANG_KANNADA_INDIA            = 01h
SUBLANG_KAZAK_KAZAKHSTAN         = 01h
SUBLANG_KHMER_CAMBODIA           = 01h
SUBLANG_KICHE_GUATEMALA          = 01h
SUBLANG_KINYARWANDA_RWANDA       = 01h
SUBLANG_KONKANI_INDIA            = 01h
SUBLANG_KYRGYZ_KYRGYZSTAN        = 01h
SUBLANG_LAO_LAO                  = 01h
SUBLANG_LATVIAN_LATVIA           = 01h
SUBLANG_LOWER_SORBIAN_GERMANY    = 02h
SUBLANG_LUXEMBOURGISH_LUXEMBOURG = 01h
SUBLANG_MACEDONIAN_MACEDONIA     = 01h
SUBLANG_MALAYALAM_INDIA          = 01h
SUBLANG_MALTESE_MALTA            = 01h
SUBLANG_MAORI_NEW_ZEALAND        = 01h
SUBLANG_MAPUDUNGUN_CHILE         = 01h
SUBLANG_MARATHI_INDIA            = 01h
SUBLANG_MOHAWK_MOHAWK            = 01h
SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA = 01h
SUBLANG_MONGOLIAN_PRC            = 02h
SUBLANG_NEPALI_NEPAL             = 01h
SUBLANG_OCCITAN_FRANCE           = 01h
SUBLANG_ORIYA_INDIA              = 01h
SUBLANG_PASHTO_AFGHANISTAN       = 01h
SUBLANG_PERSIAN_IRAN             = 01h
SUBLANG_POLISH_POLAND            = 01h
SUBLANG_PUNJABI_INDIA            = 01h
SUBLANG_QUECHUA_BOLIVIA          = 01h
SUBLANG_QUECHUA_ECUADOR          = 02h
SUBLANG_QUECHUA_PERU             = 03h
SUBLANG_ROMANIAN_ROMANIA         = 01h
SUBLANG_ROMANSH_SWITZERLAND      = 01h
SUBLANG_RUSSIAN_RUSSIA           = 01h
SUBLANG_SAMI_NORTHERN_NORWAY     = 01h
SUBLANG_SAMI_NORTHERN_SWEDEN     = 02h
SUBLANG_SAMI_NORTHERN_FINLAND    = 03h
SUBLANG_SAMI_LULE_NORWAY         = 04h
SUBLANG_SAMI_LULE_SWEDEN         = 05h
SUBLANG_SAMI_SOUTHERN_NORWAY     = 06h
SUBLANG_SAMI_SOUTHERN_SWEDEN     = 07h
SUBLANG_SAMI_SKOLT_FINLAND       = 08h
SUBLANG_SAMI_INARI_FINLAND       = 09h
SUBLANG_SANSKRIT_INDIA           = 01h
SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN = 06h
SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC = 07h
SUBLANG_SERBIAN_CROATIA          = 01h
SUBLANG_SINDHI_INDIA             = 01h
SUBLANG_SINDHI_PAKISTAN          = 02h
SUBLANG_SINDHI_AFGHANISTAN       = 02h
SUBLANG_SINHALESE_SRI_LANKA      = 01h
SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA = 01h
SUBLANG_SLOVAK_SLOVAKIA          = 01h
SUBLANG_SLOVENIAN_SLOVENIA       = 01h
SUBLANG_SPANISH_US               = 15h
SUBLANG_SWAHILI_KENYA            = 01h
SUBLANG_SYRIAC_SYRIA             = 01h
SUBLANG_TAJIK_TAJIKISTAN         = 01h
SUBLANG_TAMAZIGHT_ALGERIA_LATIN  = 02h
SUBLANG_TAMIL_INDIA              = 01h
SUBLANG_TATAR_RUSSIA             = 01h
SUBLANG_TELUGU_INDIA             = 01h
SUBLANG_THAI_THAILAND            = 01h
SUBLANG_TIBETAN_PRC              = 01h
SUBLANG_TIGRIGNA_ERITREA         = 02h
SUBLANG_TSWANA_SOUTH_AFRICA      = 01h
SUBLANG_TURKISH_TURKEY           = 01h
SUBLANG_TURKMEN_TURKMENISTAN     = 01h
SUBLANG_UIGHUR_PRC               = 01h
SUBLANG_UKRAINIAN_UKRAINE        = 01h
SUBLANG_UPPER_SORBIAN_GERMANY    = 01h
SUBLANG_VIETNAMESE_VIETNAM       = 01h
SUBLANG_WELSH_UNITED_KINGDOM     = 01h
SUBLANG_WOLOF_SENEGAL            = 01h
SUBLANG_XHOSA_SOUTH_AFRICA       = 01h
SUBLANG_YAKUT_RUSSIA             = 01h
SUBLANG_YI_PRC                   = 01h
SUBLANG_YORUBA_NIGERIA           = 01h
SUBLANG_ZULU_SOUTH_AFRICA        = 01h
SORT_INVARIANT_MATH              = 1h
SORT_JAPANESE_RADICALSTROKE      = 4h
LOCALE_NAME_MAX_LENGTH           = 85
EXCEPTION_READ_FAULT             = 0
EXCEPTION_WRITE_FAULT            = 1
EXCEPTION_EXECUTE_FAULT          = 8
INITIAL_FPCSR                    = 027fh
RUNTIME_FUNCTION_INDIRECT        = 1h
BREAK_DEBUG_BASE                 = 080000h
WOW64_CONTEXT_i386               = 00010000h
WOW64_CONTEXT_i486               = 00010000h
WOW64_SIZE_OF_80387_REGISTERS    = 80
WOW64_MAXIMUM_SUPPORTED_EXTENSION = 512
SID_HASH_SIZE                    = 32
SECURITY_CREATOR_OWNER_RIGHTS_RID = 00000004h
SECURITY_IUSER_RID               = 00000011h
SECURITY_ENTERPRISE_READONLY_CONTROLLERS_RID = 00000016h
SECURITY_WRITE_RESTRICTED_CODE_RID = 00000021h
SECURITY_SERVICE_ID_BASE_RID     = 00000050h
SECURITY_SERVICE_ID_RID_COUNT    = 6
SECURITY_RESERVED_ID_BASE_RID    = 00000051h
DOMAIN_GROUP_RID_READONLY_CONTROLLERS = 00000209h
DOMAIN_ALIAS_RID_DCOM_USERS      = 00000232h
DOMAIN_ALIAS_RID_IUSERS          = 00000238h
DOMAIN_ALIAS_RID_CRYPTO_OPERATORS = 00000239h
DOMAIN_ALIAS_RID_CACHEABLE_PRINCIPALS_GROUP = 0000023Bh
DOMAIN_ALIAS_RID_NON_CACHEABLE_PRINCIPALS_GROUP = 0000023Ch
DOMAIN_ALIAS_RID_EVENT_LOG_READERS_GROUP = 0000023Dh
SECURITY_MANDATORY_UNTRUSTED_RID = 00000000h
SECURITY_MANDATORY_LOW_RID       = 00001000h
SECURITY_MANDATORY_MEDIUM_RID    = 00002000h
SECURITY_MANDATORY_HIGH_RID      = 00003000h
SECURITY_MANDATORY_SYSTEM_RID    = 00004000h
SECURITY_MANDATORY_PROTECTED_PROCESS_RID = 00005000h
SECURITY_MANDATORY_MAXIMUM_USER_RID = SECURITY_MANDATORY_SYSTEM_RID
SE_GROUP_INTEGRITY               = 00000020h
SE_GROUP_INTEGRITY_ENABLED       = 00000040h
SYSTEM_MANDATORY_LABEL_ACE_TYPE  = 11h
SYSTEM_MANDATORY_LABEL_NO_WRITE_UP = 1h
SYSTEM_MANDATORY_LABEL_NO_READ_UP = 2h
SYSTEM_MANDATORY_LABEL_NO_EXECUTE_UP = 4h
TOKEN_MANDATORY_POLICY_OFF       = 0h
TOKEN_MANDATORY_POLICY_NO_WRITE_UP = 1h
TOKEN_MANDATORY_POLICY_NEW_PROCESS_MIN = 2h
POLICY_AUDIT_SUBCATEGORY_COUNT   = 50
LUA_TOKEN                        = 4h
WRITE_RESTRICTED                 = 8h
LABEL_SECURITY_INFORMATION       = 00000010h
PROCESS_QUERY_LIMITED_INFORMATION = 1000h
THREAD_SET_LIMITED_INFORMATION   = 0400h
THREAD_QUERY_LIMITED_INFORMATION = 0800h
QUOTA_LIMITS_USE_DEFAULT_LIMITS  = 00000010h
PS_RATE_PHASE_BITS               = 4
CACHE_FULLY_ASSOCIATIVE          = 0FFh
PF_SSE_DAZ_MODE_AVAILABLE        = 11
PF_NX_ENABLED                    = 12
PF_SSE3_INSTRUCTIONS_AVAILABLE   = 13
PF_COMPARE_EXCHANGE128           = 14
PF_COMPARE64_EXCHANGE128         = 15
PF_CHANNELS_ENABLED              = 16
SECTION_MAP_EXECUTE_EXPLICIT     = 0020h
SESSION_QUERY_ACCESS             = 0001h
SESSION_MODIFY_ACCESS            = 0002h
MEM_ROTATE                       = 800000h
SEC_PROTECTED_IMAGE              = 2000000h
SEC_WRITECOMBINE                 = 40000000h
SEC_LARGE_PAGES                  = 80000000h
FILE_ATTRIBUTE_VIRTUAL           = 00010000h
FILE_SEQUENTIAL_WRITE_ONCE       = 00100000h
FILE_SUPPORTS_TRANSACTIONS       = 00200000h
IO_REPARSE_TAG_SYMLINK           = 0A000000Ch
IO_REPARSE_TAG_DFSR              = 80000012h
ES_AWAYMODE_REQUIRED             = 00000040h
PO_TRANSITION_VETO_TYPE_WINDOW   = 00000001h
PO_TRANSITION_VETO_TYPE_SERVICE  = 00000002h
POWER_SETTING_VALUE_VERSION      = 1h
PROC_IDLE_BUCKET_COUNT           = 6
ACPI_PPM_SOFTWARE_ALL            = 0FCh
ACPI_PPM_SOFTWARE_ANY            = 0FDh
ACPI_PPM_HARDWARE_ALL            = 0FEh
MS_PPM_SOFTWARE_ALL              = 1h
BATTERY_DISCHARGE_FLAGS_EVENTCODE_MASK = 00000007h
BATTERY_DISCHARGE_FLAGS_ENABLE   = 80000000h
PROCESSOR_IDLESTATE_POLICY_COUNT = 3h
PERFSTATE_POLICY_CHANGE_IDEAL    = 00h
PERFSTATE_POLICY_CHANGE_SINGLE   = 01h
PERFSTATE_POLICY_CHANGE_ROCKET   = 02h
PERFSTATE_POLICY_CHANGE_MAX      = PERFSTATE_POLICY_CHANGE_ROCKET
IMAGE_NT_OPTIONAL_HDR_MAGIC      = IMAGE_NT_OPTIONAL_HDR64_MAGIC
IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION = 16
IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE = 0040h
IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY = 0080h
IMAGE_DLLCHARACTERISTICS_NX_COMPAT = 0100h
IMAGE_REL_SHM_PCRELPT            = 0013h
IMAGE_REL_SHM_REFLO              = 0014h
IMAGE_REL_SHM_REFHALF            = 0015h
IMAGE_REL_SHM_RELLO              = 0016h
IMAGE_REL_SHM_RELHALF            = 0017h
IMAGE_REL_SHM_PAIR               = 0018h
IMAGE_REL_SH_NOMODE              = 8000h
IMAGE_REL_EBC_ABSOLUTE           = 0000h
IMAGE_REL_EBC_ADDR32NB           = 0001h
IMAGE_REL_EBC_REL32              = 0002h
IMAGE_REL_EBC_SECTION            = 0003h
IMAGE_REL_EBC_SECREL             = 0004h
X3_OPCODE_INST_WORD_X            = 3
X3_OPCODE_SIZE_X                 = 4
X3_OPCODE_INST_WORD_POS_X        = 28
X3_OPCODE_SIGN_VAL_POS_X         = 0
X3_I_INST_WORD_X                 = 3
X3_I_SIZE_X                      = 1
X3_I_INST_WORD_POS_X             = 27
X3_I_SIGN_VAL_POS_X              = 59
X3_D_WH_INST_WORD_X              = 3
X3_D_WH_SIZE_X                   = 3
X3_D_WH_INST_WORD_POS_X          = 24
X3_D_WH_SIGN_VAL_POS_X           = 0
X3_IMM20_INST_WORD_X             = 3
X3_IMM20_SIZE_X                  = 20
X3_IMM20_INST_WORD_POS_X         = 4
X3_IMM20_SIGN_VAL_POS_X          = 0
X3_IMM39_1_INST_WORD_X           = 2
X3_IMM39_1_SIZE_X                = 23
X3_IMM39_1_INST_WORD_POS_X       = 0
X3_IMM39_1_SIGN_VAL_POS_X        = 36
X3_IMM39_2_INST_WORD_X           = 1
X3_IMM39_2_SIZE_X                = 16
X3_IMM39_2_INST_WORD_POS_X       = 16
X3_IMM39_2_SIGN_VAL_POS_X        = 20
X3_P_INST_WORD_X                 = 3
X3_P_SIZE_X                      = 4
X3_P_INST_WORD_POS_X             = 0
X3_P_SIGN_VAL_POS_X              = 0
X3_TMPLT_INST_WORD_X             = 0
X3_TMPLT_SIZE_X                  = 4
X3_TMPLT_INST_WORD_POS_X         = 0
X3_TMPLT_SIGN_VAL_POS_X          = 0
X3_BTYPE_QP_INST_WORD_X          = 2
X3_BTYPE_QP_SIZE_X               = 9
X3_BTYPE_QP_INST_WORD_POS_X      = 23
X3_BTYPE_QP_INST_VAL_POS_X       = 0
X3_EMPTY_INST_WORD_X             = 1
X3_EMPTY_SIZE_X                  = 2
X3_EMPTY_INST_WORD_POS_X         = 14
X3_EMPTY_INST_VAL_POS_X          = 0
RTL_RUN_ONCE_INIT                = 0
RTL_RUN_ONCE_CHECK_ONLY          = 00000001h
RTL_RUN_ONCE_ASYNC               = 00000002h
RTL_RUN_ONCE_INIT_FAILED         = 00000004h
RTL_RUN_ONCE_CTX_RESERVED_BITS   = 2
HEAP_CREATE_ENABLE_EXECUTE       = 00040000h
SEF_MACL_NO_WRITE_UP             = 100h
SEF_MACL_NO_READ_UP              = 200h
SEF_MACL_NO_EXECUTE_UP           = 400h
SEF_AVOID_OWNER_RESTRICTION      = 1000h
RTL_CRITICAL_SECTION_FLAG_NO_DEBUG_INFO = 01000000h
RTL_CRITICAL_SECTION_FLAG_DYNAMIC_SPIN = 02000000h
RTL_CRITICAL_SECTION_FLAG_STATIC_INIT = 04000000h
RTL_CRITICAL_SECTION_ALL_FLAG_BITS = 0FF000000h
RTL_CRITICAL_SECTION_DEBUG_FLAG_STATIC_INIT = 00000001h
RTL_SRWLOCK_INIT                 = 0
RTL_CONDITION_VARIABLE_INIT      = 0
RTL_CONDITION_VARIABLE_LOCKMODE_SHARED = 1h
REG_APP_HIVE                     = 00000010h
REG_PROCESS_PRIVATE              = 00000020h
REG_START_JOURNAL                = 00000040h
REG_HIVE_EXACT_FILE_GROWTH       = 00000080h
REG_HIVE_NO_RM                   = 00000100h
REG_HIVE_SINGLE_LOG              = 00000200h
TRANSACTIONMANAGER_QUERY_INFORMATION = 0001h
TRANSACTIONMANAGER_SET_INFORMATION = 0002h
TRANSACTIONMANAGER_RECOVER       = 0004h
TRANSACTIONMANAGER_RENAME        = 0008h
TRANSACTIONMANAGER_CREATE_RM     = 0010h
TRANSACTIONMANAGER_BIND_TRANSACTION = 0020h
TRANSACTIONMANAGER_GENERIC_EXECUTE = STANDARD_RIGHTS_EXECUTE
TRANSACTION_QUERY_INFORMATION    = 0001h
TRANSACTION_SET_INFORMATION      = 0002h
TRANSACTION_ENLIST               = 0004h
TRANSACTION_COMMIT               = 0008h
TRANSACTION_ROLLBACK             = 0010h
TRANSACTION_PROPAGATE            = 0020h
TRANSACTION_SAVEPOINT            = 0040h
TRANSACTION_MARSHALL             = TRANSACTION_QUERY_INFORMATION
RESOURCEMANAGER_QUERY_INFORMATION = 0001h
RESOURCEMANAGER_SET_INFORMATION  = 0002h
RESOURCEMANAGER_RECOVER          = 0004h
RESOURCEMANAGER_ENLIST           = 0008h
RESOURCEMANAGER_GET_NOTIFICATION = 0010h
RESOURCEMANAGER_REGISTER_PROTOCOL = 0020h
RESOURCEMANAGER_COMPLETE_PROPAGATION = 0040h
ENLISTMENT_QUERY_INFORMATION     = 0001h
ENLISTMENT_SET_INFORMATION       = 0002h
ENLISTMENT_RECOVER               = 0004h
ENLISTMENT_SUBORDINATE_RIGHTS    = 0008h
ENLISTMENT_SUPERIOR_RIGHTS       = 0010h
PcTeb                            = 18h
ACTIVATION_CONTEXT_SECTION_APPLICATION_SETTINGS = 10

LIST_ENTRY struct
    Flink DWORD ?
    Blink DWORD ?
LIST_ENTRY ends

SINGLE_LIST_ENTRY struct
    Next DWORD ?
SINGLE_LIST_ENTRY ends

OBJECTID struct
    Lineage         GUID <>
    Uniquifier      dd ?
OBJECTID ends

;LDTBits RECORD  rBaseHi:8, Granularity:1,Default_Big : 1,Reserved_0:1,Sys:1,LimitHi:4,Pres:1, Dpl:2, S_bit:1, Type1:4,rBaseMid:8

LDT_ENTRY struct
    LimitLow    dw ?
    BaseLow     dw ?
    union ;HighWord1
        Bytes LDT_BYTES <>
        Bits  dd ?;LDTBits   <>
    ends
LDT_ENTRY ends

SID struct
   Revision db ?
   SubAuthorityCount db ?
   IdentifierAuthority SID_IDENTIFIER_AUTHORITY <>
   SubAuthority dd ANYSIZE_ARRAY dup(?)
SID ends


ACCESS_ALLOWED_OBJECT_ACE struct
    Header ACE_HEADER   <>
    Mask1 dd            ?
    Flags dd            ?
    ObjectType GUID     <>
    InheritedObjectType GUID <>
    SidStart dd         ?
ACCESS_ALLOWED_OBJECT_ACE ends

ACCESS_DENIED_OBJECT_ACE struct
    Header ACE_HEADER   <>
    Mask1 dd            ?
    Flags dd            ?
    ObjectType GUID     <>
    InheritedObjectType GUID <>
    SidStart dd         ?
ACCESS_DENIED_OBJECT_ACE ends

SYSTEM_AUDIT_OBJECT_ACE struct
    Header ACE_HEADER   <>
    Mask1 dd            ?
    Flags dd            ?
    ObjectType GUID     <>
    InheritedObjectType GUID <>
    SidStart dd         ?
SYSTEM_AUDIT_OBJECT_ACE ends

SYSTEM_ALARM_OBJECT_ACE struct
    Header ACE_HEADER <>
    Mask1 dd        ?
    Flags dd        ?
    ObjectType GUID <>
    InheritedObjectType GUID <>
    SidStart dd     ?
SYSTEM_ALARM_OBJECT_ACE ends

SECURITY_DESCRIPTOR_RELATIVE struct
    Revision db     ?
    Sbz1 db         ?
    Control1 dw     ?
    Owner dd        ?
    Group1 dd       ?
    Sacl dd         ?
    Dacl dd         ?
SECURITY_DESCRIPTOR_RELATIVE ends

OBJECT_TYPE_LIST struct
    Level dw        ?
    Sbz dw          ?
    ObjectType dd   ?
OBJECT_TYPE_LIST ends

TOKEN_USER struct
    User SID_AND_ATTRIBUTES <>
TOKEN_USER ends

TOKEN_OWNER struct
    Owner dd ?
TOKEN_OWNER ends

TOKEN_PRIMARY_GROUP struct
    PrimaryGroup dd ?
TOKEN_PRIMARY_GROUP ends

TOKEN_DEFAULT_DACL struct
    DefaultDacl dd ?
TOKEN_DEFAULT_DACL ends

TOKEN_SOURCE struct
    SourceName db TOKEN_SOURCE_LENGTH dup(?)
    SourceIdentifier LUID <>
TOKEN_SOURCE ends

TOKEN_CONTROL struct
    TokenId LUID                <>
    AuthenticationId LUID       <>
    ModifiedId LUID             <>
    TokenSource1 TOKEN_SOURCE   <>
TOKEN_CONTROL ends

NT_TIB struct
    ExceptionList dd    ?
    StackBase dd        ?
    StackLimit dd       ?
    SubSystemTib dd     ?
    union
        FiberData dd    ?
        Version dd      ?
    ends
    ArbitraryUserPointer dd ?
    Self dd ?
NT_TIB ends

FILE_NOTIFY_INFORMATION struct
    NextEntryOffset dd  ?
    Action dd           ?
    FileNameLength dd   ?
    FileName dw         ?
FILE_NOTIFY_INFORMATION ends


REPARSE_DATA_BUFFER struct
    ReparseTag dd           ?
    ReparseDataLength dw    ?
    Reserved dw             ?
    union
        struct ;SymbolicLinkReparseBuffer
               ;MountPointReparseBuffer
            SubstituteNameOffset dw ?
            SubstituteNameLength dw ?
            PrintNameOffset dw      ?
            PrintNameLength dw      ?
            PathBuffer dw           ?
        ends
        struct ;GenericReparseBuffer
            DataBuffer db ?
        ends
    ends
REPARSE_DATA_BUFFER ends

REPARSE_GUID_DATA_BUFFER struct
    ReparseTag dd           ?
    ReparseDataLength dw    ?
    Reserved dw             ?
    ReparseGuid GUID        <>
    struct ;GenericReparseBuffer
        DataBuffer db ?
    ends
REPARSE_GUID_DATA_BUFFER ends


REPARSE_POINT_INFORMATION struct
    ReparseDataLength dw    ?
    UnparsedNameLength dw   ?
REPARSE_POINT_INFORMATION ends

POWER_DEVICE_TIMEOUTS struct
    ConservationIdleTime DWORD ?
    PerformanceIdleTime DWORD  ?
POWER_DEVICE_TIMEOUTS ends

IMAGE_VXD_HEADER struct
    e32_magic dw        ?
    e32_border db       ?
    e32_worder db       ?
    e32_level dd        ?
    e32_cpu dw          ?
    e32_os dw           ?
    e32_ver dd          ?
    e32_mflags dd       ?
    e32_mpages dd       ?
    e32_startobj dd     ?
    e32_eip dd          ?
    e32_stackobj dd     ?
    e32_esp dd          ?
    e32_pagesize dd     ?
    e32_lastpagesize dd ?
    e32_fixupsize dd    ?
    e32_fixupsum dd     ?
    e32_ldrsize dd      ?
    e32_ldrsum dd       ?
    e32_objtab dd       ?
    e32_objcnt dd       ?
    e32_objmap dd       ?
    e32_itermap dd      ?
    e32_rsrctab dd      ?
    e32_rsrccnt dd      ?
    e32_restab dd       ?
    e32_enttab dd       ?
    e32_dirtab dd       ?
    e32_dircnt dd       ?
    e32_fpagetab dd     ?
    e32_frectab dd      ?
    e32_impmod dd       ?
    e32_impmodcnt dd    ?
    e32_impproc dd      ?
    e32_pagesum dd      ?
    e32_datapage dd     ?
    e32_preload dd      ?
    e32_nrestab dd      ?
    e32_cbnrestab dd    ?
    e32_nressum dd      ?
    e32_autodata dd     ?
    e32_debuginfo dd    ?
    e32_debuglen dd     ?
    e32_instpreload dd  ?
    e32_instdemand dd   ?
    e32_heapsize dd     ?
    e32_res3 db 12    dup(?)
    e32_winresoff dd    ?
    e32_winreslen dd    ?
    e32_devid dw        ?
    e32_ddkver dw       ?
IMAGE_VXD_HEADER ends

IMAGE_ROM_OPTIONAL_HEADER struct
    Magic dw                    ?
    MajorLinkerVersion db       ?
    MinorLinkerVersion db       ?
    SizeOfCode dd               ?
    SizeOfInitializedData dd    ?
    SizeOfUninitializedData dd  ?
    AddressOfEntryPoint dd      ?
    BaseOfCode dd               ?
    BaseOfData dd               ?
    BaseOfBss dd                ?
    GprMask dd                  ?
    CprMask dd              4 dup(?)
    GpValue dd                  ?
IMAGE_ROM_OPTIONAL_HEADER ends

IMAGE_ROM_HEADERS struct
    FileHeader IMAGE_FILE_HEADER <>
    OptionalHeader IMAGE_ROM_OPTIONAL_HEADER <>
IMAGE_ROM_HEADERS ends

IMAGE_SECTION_HEADER struct
    Name db IMAGE_SIZEOF_SHORT_NAME dup(?)
    union ;Misc
        PhysicalAddress dd  ?
        VirtualSize dd      ?
    ends
    VirtualAddress dd       ?
    SizeOfRawData dd        ?
    PointerToRawData dd     ?
    PointerToRelocations dd ?
    PointerToLinenumbers dd ?
    NumberOfRelocations dw  ?
    NumberOfLinenumbers dw  ?
    Characteristics dd      ?
IMAGE_SECTION_HEADER ends

IMAGE_SYMBOL struct
    union ;N
        ShortName db 8 dup(?)
        struct ;Name
            Short1 dd       ?
            Long1 dd        ?
        ends
        LongName dd 2 dup(?)
    ends
    Value dd                ?
    SectionNumber dw        ?
    Type1 dw                ?
    StorageClass db         ?
    NumberOfAuxSymbols db   ?
IMAGE_SYMBOL ends

IMAGE_AUX_SYMBOL struct
    struct ;Sym
        TagIndex dd ?
        union ;Misc
            struct ;LnSz
                Linenumber dw ?
                Size1 dw ?
               ends
           TotalSize dd ?
        ends
        union ;FcnAry
            struct ;Function
                PointerToLinenumber dd ?
                PointerToNextFunction dd ?
            ends
            struct ;Array
                Dimension dw 4 dup(?)
            ends
        ends
        TvIndex dw ?
     ends
    struct ;File
        Name db IMAGE_SIZEOF_SYMBOL dup(?)
     ends
    struct ;Section
        Length dd              ?
        NumberOfRelocations dw  ?
        NumberOfLinenumbers dw  ?
        CheckSum dd             ?
        Number dw               ?
        Selection db            ?
    ends
IMAGE_AUX_SYMBOL ends

IMAGE_RELOCATION struct
    union
        VirtualAddress dd   ?
        RelocCount dd       ?
    ends
    SymbolTableIndex dd     ?
    Type1 dw ?
IMAGE_RELOCATION ends

IMAGE_LINENUMBER struct
    union ;Type1
        SymbolTableIndex dd ?
        VirtualAddress dd   ?
     ends
    Linenumber dw ?
IMAGE_LINENUMBER ends


IMAGE_BASE_RELOCATION struct
    VirtualAddress dd   ?
    SizeOfBlock dd      ?
IMAGE_BASE_RELOCATION ends

IMAGE_ARCHIVE_MEMBER_HEADER struct
    Name db        16 dup(?)
    Date db         12 dup(?)
    UserID db       6 dup(?)
    GroupID db      6 dup(?)
    Mode db         8 dup(?)
    Size1 db        10 dup(?)
    EndHeader db    2 dup(?)
IMAGE_ARCHIVE_MEMBER_HEADER ends


IMAGE_IMPORT_BY_NAME struct
    Hint dw     ?
    Name db    ?
IMAGE_IMPORT_BY_NAME ends

IMAGE_THUNK_DATA32 struct
    union ;u1
        ForwarderString dd  ?
        Function dd         ?
        Ordinal dd          ?
        AddressOfData dd    ?
    ends
IMAGE_THUNK_DATA32 ends


IMAGE_TLS_DIRECTORY32 struct
    StartAddressOfRawData dd    ?
    EndAddressOfRawData dd      ?
    AddressOfIndex dd           ?
    AddressOfCallBacks dd       ?
    SizeOfZeroFill dd           ?
    Characteristics dd          ?
IMAGE_TLS_DIRECTORY32 ends

TYPEDEF IMAGE_THUNK_DATA, IMAGE_THUNK_DATA32
TYPEDEF IMAGE_TLS_DIRECTORY, IMAGE_TLS_DIRECTORY32

IMAGE_IMPORT_DESCRIPTOR struct
    union
        Characteristics dd      ?
        OriginalFirstThunk dd   ?
     ends
    TimeDateStamp dd    ?
    ForwarderChain dd   ?
    Name dd            ?
    FirstThunk dd       ?
IMAGE_IMPORT_DESCRIPTOR ends

IMAGE_BOUND_IMPORT_DESCRIPTOR struct
    TimeDateStamp dd    ?
    OffsetModuleName dw ?
    NumberOfModuleForwarderRefs dw ?
IMAGE_BOUND_IMPORT_DESCRIPTOR ends

IMAGE_BOUND_FORWARDER_REF struct
    TimeDateStamp dd    ?
    OffsetModuleName dw ?
    Reserved dw         ?
IMAGE_BOUND_FORWARDER_REF ends

IMAGE_RESOURCE_DIRECTORY struct
    Characteristics dd      ?
    TimeDateStamp dd        ?
    MajorVersion dw         ?
    MinorVersion dw         ?
    NumberOfNamedEntries dw ?
    NumberOfIdEntries dw    ?
IMAGE_RESOURCE_DIRECTORY ends

IMAGE_RESOURCE_DIRECTORY_ENTRY struct
    union
        ;rName   RECORD NameIsString:1,NameOffset:31
        rName dd ?
        Name dd ?
        Id dw ?
    ends
    union
        OffsetToData dd ?
        ;rDirectory    RECORD DataIsDirectory:1,OffsetToDirectory:31
        rDirectory   dd ?
    ends
IMAGE_RESOURCE_DIRECTORY_ENTRY ends

IMAGE_RESOURCE_DIRECTORY_STRING struct
    Length dw      ?
    NameString db   ?
IMAGE_RESOURCE_DIRECTORY_STRING ends

IMAGE_RESOURCE_DIR_STRING_U struct
    Length dw      ?
    NameString dw   ?
IMAGE_RESOURCE_DIR_STRING_U ends

IMAGE_RESOURCE_DATA_ENTRY struct
    OffsetToData dd ?
    Size1 dd        ?
    CodePage dd     ?
    Reserved dd     ?
IMAGE_RESOURCE_DATA_ENTRY ends

IMAGE_LOAD_CONFIG_DIRECTORY struct
    Characteristics dd                  ?
    TimeDateStamp dd                    ?
    MajorVersion dw                     ?
    MinorVersion dw                     ?
    GlobalFlagsClear dd                 ?
    GlobalFlagsSet dd                   ?
    CriticalSectionDefaultTimeout dd    ?
    DeCommitFreeBlockThreshold dd       ?
    DeCommitTotalFreeThreshold dd       ?
    LockPrefixTable dd                  ?
    MaximumAllocationSize dd            ?
    VirtualMemoryThreshold dd           ?
    ProcessHeapFlags dd                 ?
    ProcessAffinityMask dd              ?
    CSDVersion dw                       ?
    Reserved1 dw                        ?
    EditList dd                         ?
    Reserved dd                         ?
IMAGE_LOAD_CONFIG_DIRECTORY ends

IMAGE_DEBUG_DIRECTORY struct
    Characteristics dd  ?
    TimeDateStamp dd    ?
    MajorVersion dw     ?
    MinorVersion dw     ?
    Type1 dd            ?
    SizeOfData dd       ?
    AddressOfRawData dd ?
    PointerToRawData dd ?
IMAGE_DEBUG_DIRECTORY ends

IMAGE_COFF_SYMBOLS_HEADER struct
    NumberOfSymbols dd      ?
    LvaToFirstSymbol dd     ?
    NumberOfLinenumbers dd  ?
    LvaToFirstLinenumber dd ?
    RvaToFirstByteOfCode dd ?
    RvaToLastByteOfCode dd  ?
    RvaToFirstByteOfData dd ?
    RvaToLastByteOfData dd  ?
IMAGE_COFF_SYMBOLS_HEADER ends

 ; FPOProlog    RECORD cbFrame  : 2, reserved : 1, fUseBP   : 1, fHasSEH  : 1, cbRegs   : 3, cbProlog : 8
 ; FPO_DATA struct
 ;     ulOffStart dd   ?
 ;     cbProcSize dd   ?
 ;     cdwLocals dd    ?
 ;     cdwParams dw    ?
 ;   rProlog FPOProlog <>
 ; FPO_DATA ends

FPO_DATA struct
    ulOffStart  dd ?
    cbProcSize  dd ?
    cdwLocals   dd ?
    cdwParams   dw ?
    cbProlog    dw ?
    cbRegs      dw ?
    fHasSEH     dw ?
    fUseBP      dw ?
    reserved    dw ?
    cbFrame     dw ?
FPO_DATA ends

IMAGE_DEBUG_MISC struct
    DataType dd     ?
    Length dd      ?
    Unicode BOOLEAN ?
    Reserved db 3 dup(?)
    Data db         ?
IMAGE_DEBUG_MISC ends


IMAGE_FUNCTION_ENTRY struct
    StartingAddress dd  ?
    EndingAddress dd    ?
    EndOfPrologue dd    ?
IMAGE_FUNCTION_ENTRY ends

IMAGE_SEPARATE_DEBUG_HEADER struct
    Signature dw            ?
    Flags dw                ?
    Machine dw              ?
    Characteristics dw      ?
    TimeDateStamp dd        ?
    CheckSum dd             ?
    ImageBase dd            ?
    SizeOfImage dd          ?
    NumberOfSections dd     ?
    ExportedNamesSize dd    ?
    DebugDirectorySize dd   ?
    SectionAlignment dd     ?
    Reserved dd 2 dup(?)
IMAGE_SEPARATE_DEBUG_HEADER ends

;ImportRec RECORD Reserved :11,NameType :3,Type2 :2

IMPORT_OBJECT_HEADER struct
    Sig1 dw     ?
    Sig2 dw     ?
    Version dw  ?
    Machine dw  ?
    TimeDateStamp dd ?
    SizeOfData dd   ?
    struct
    union
        Ordinal dw  ?
        Hint dw     ?
    ends
    ends
    rImport dw ?;ImportRec <>
IMPORT_OBJECT_HEADER ends

MESSAGE_RESOURCE_ENTRY struct
    Length dw  ?
    Flags dw    ?
    Text db     ?
MESSAGE_RESOURCE_ENTRY ends

MESSAGE_RESOURCE_BLOCK struct
    LowId dd    ?
    HighId dd   ?
    OffsetToEntries dd ?
MESSAGE_RESOURCE_BLOCK ends

MESSAGE_RESOURCE_DATA struct
    NumberOfBlocks dd ?
    Blocks MESSAGE_RESOURCE_BLOCK <>
MESSAGE_RESOURCE_DATA ends

RTL_CRITICAL_SECTION_DEBUG struct
    Type1 dw            ?
    CreatorBackTraceIndex dw ?
    CriticalSection dd  ?
    ProcessLocksList LIST_ENTRY <>
    EntryCount dd       ?
    ContentionCount dd  ?
    Spare dd 2 dup(?)
RTL_CRITICAL_SECTION_DEBUG ends

EVENTSFORLOGFILE struct
    ulSize dd       ?
    szLogicalLogFile dw MAXLOGICALLOGNAMESIZE dup(?)
    ulNumRecords dd ?
     pEventLogRecords EVENTLOGRECORD <>
EVENTSFORLOGFILE ends

PACKEDEVENTINFO struct
    ulSize dd                   ?
    ulNumEventsForLogFile dd    ?
    ulOffsets dd                ?
PACKEDEVENTINFO ends

TAPE_ERASE struct
    Type1 dd ?
    Immediate BOOLEAN ?
TAPE_ERASE ends

TAPE_PREPARE struct
    Operation dd        ?
    Immediate BOOLEAN   ?
TAPE_PREPARE ends

TAPE_WRITE_MARKS struct
    Type1 dd    ?
    Count dd    ?
    Immediate BOOLEAN ?
TAPE_WRITE_MARKS ends

TAPE_GET_POSITION struct
    Type1 dd        ?
    Partition dd    ?
    Offset1 QWORD   ?
TAPE_GET_POSITION ends

TAPE_SET_POSITION struct
    Method dd           ?
    Partition dd        ?
    Offset1 QWORD       ?
    Immediate BOOLEAN   ?
TAPE_SET_POSITION ends

TAPE_GET_DRIVE_PARAMETERS struct
    ECC BOOLEAN             ?
    Compression BOOLEAN     ?
    DataPadding BOOLEAN     ?
    ReportSetmarks BOOLEAN  ?
    DefaultBlockSize dd     ?
    MaximumBlockSize dd     ?
    MinimumBlockSize dd     ?
    MaximumPartitionCount dd ?
    FeaturesLow dd          ?
    FeaturesHigh dd         ?
    EOTWarningZoneSize dd   ?
TAPE_GET_DRIVE_PARAMETERS ends

TAPE_SET_DRIVE_PARAMETERS struct
    ECC BOOLEAN             ?
    Compression BOOLEAN     ?
    DataPadding BOOLEAN     ?
    ReportSetmarks BOOLEAN  ?
    EOTWarningZoneSize dd   ?
TAPE_SET_DRIVE_PARAMETERS ends

TAPE_GET_MEDIA_PARAMETERS struct
    Capacity QWORD          ?
    Remaining QWORD         ?
    BlockSize dd            ?
    PartitionCount dd       ?
    WriteProtected BOOLEAN  ?
TAPE_GET_MEDIA_PARAMETERS ends

TAPE_SET_MEDIA_PARAMETERS struct
    BlockSize dd ?
TAPE_SET_MEDIA_PARAMETERS ends

TAPE_CREATE_PARTITION struct
    Method dd   ?
    Count dd    ?
    Size1 dd    ?
TAPE_CREATE_PARTITION ends

; -------------------------------------
; additional equates from server 2003
; -------------------------------------

VER_SERVER_NT                    = 80000000h
VER_WORKSTATION_NT               = 40000000h
VER_SUITE_SMALLBUSINESS          = 00000001h
VER_SUITE_ENTERPRISE             = 00000002h
VER_SUITE_BACKOFFICE             = 00000004h
VER_SUITE_COMMUNICATIONS         = 00000008h
VER_SUITE_TERMINAL               = 00000010h
VER_SUITE_SMALLBUSINESS_RESTRICTED = 00000020h
VER_SUITE_EMBEDDEDNT             = 00000040h
VER_SUITE_DATACENTER             = 00000080h
VER_SUITE_SINGLEUSERTS           = 00000100h
VER_SUITE_PERSONAL               = 00000200h
VER_SUITE_BLADE                  = 00000400h
VER_SUITE_EMBEDDED_RESTRICTED    = 00000800h
VER_SUITE_SECURITY_APPLIANCE     = 00001000h
LANG_INVARIANT                   = 7fh
LANG_DIVEHI                      = 65h
LANG_GALICIAN                    = 56h
LANG_KYRGYZ                      = 40h
LANG_MONGOLIAN                   = 50h
LANG_SYRIAC                      = 5ah
SUBLANG_KASHMIRI_SASIA           = 02h
DBG_EXCEPTION_HANDLED            = (00010001h)
DBG_COMMAND_EXCEPTION            = (40010009h)
STATUS_REG_NAT_CONSUMPTION       = (0C00002C9h)
STATUS_SXS_EARLY_DEACTIVATION    = (0C015000Fh)
STATUS_SXS_INVALID_DEACTIVATION  = (0C0150010h)
CONTEXT32_LENGTH                 = 130h
MD_LFHINT_NONE                   = 00h
MD_LFHINT_NT1                    = 01h
MD_LFHINT_NT2                    = 02h
MD_LFHINT_NTA                    = 03h
PF_TEMPORAL_LEVEL_1              = MD_LFHINT_NONE
PF_NON_TEMPORAL_LEVEL_ALL        = MD_LFHINT_NTA
CONTEXT_EXCEPTION_ACTIVE         = 8000000h
CONTEXT_SERVICE_ACTIVE           = 10000000h
CONTEXT_EXCEPTION_REQUEST        = 40000000h
CONTEXT_EXCEPTION_REPORTING      = 80000000h
SECURITY_TERMINAL_SERVER_RID     = (0000000Dh)
SECURITY_REMOTE_LOGON_RID        = (0000000Eh)
SECURITY_THIS_ORGANIZATION_RID   = (0000000Fh)
SECURITY_LOCAL_SERVICE_RID       = (00000013h)
SECURITY_NETWORK_SERVICE_RID     = (00000014h)
SECURITY_NT_NON_UNIQUE_SUB_AUTH_COUNT = (3h)
SECURITY_PACKAGE_BASE_RID        = (00000040h)
SECURITY_PACKAGE_RID_COUNT       = (2h)
SECURITY_PACKAGE_NTLM_RID        = (0000000Ah)
SECURITY_PACKAGE_SCHANNEL_RID    = (0000000Eh)
SECURITY_PACKAGE_DIGEST_RID      = (00000015h)
SECURITY_MAX_ALWAYS_FILTERED     = (000003E7h)
SECURITY_MIN_NEVER_FILTERED      = (000003E8h)
SECURITY_OTHER_ORGANIZATION_RID  = (000003E8h)
FOREST_USER_RID_MAX              = (000001F3h)
DOMAIN_USER_RID_MAX              = (000003E7h)
DOMAIN_GROUP_RID_ENTERPRISE_ADMINS = (00000207h)
DOMAIN_GROUP_RID_POLICY_ADMINS   = (00000208h)
DOMAIN_ALIAS_RID_RAS_SERVERS     = (00000229h)
DOMAIN_ALIAS_RID_PREW2KCOMPACCESS = (0000022Ah)
DOMAIN_ALIAS_RID_REMOTE_DESKTOP_USERS = (0000022Bh)
DOMAIN_ALIAS_RID_NETWORK_CONFIGURATION_OPS = (0000022Ch)
DOMAIN_ALIAS_RID_INCOMING_FOREST_TRUST_BUILDERS = (0000022Dh)
DOMAIN_ALIAS_RID_MONITORING_USERS = (0000022Eh)
DOMAIN_ALIAS_RID_LOGGING_USERS   = (0000022Fh)
DOMAIN_ALIAS_RID_AUTHORIZATIONACCESS = (00000230h)
DOMAIN_ALIAS_RID_TS_LICENSE_SERVERS = (00000231h)
SE_GROUP_RESOURCE                = (20000000h)
ACCESS_ALLOWED_CALLBACK_ACE_TYPE = (09h)
ACCESS_DENIED_CALLBACK_ACE_TYPE  = (0Ah)
ACCESS_ALLOWED_CALLBACK_OBJECT_ACE_TYPE = (0Bh)
ACCESS_DENIED_CALLBACK_OBJECT_ACE_TYPE = (0Ch)
SYSTEM_AUDIT_CALLBACK_ACE_TYPE   = (0Dh)
SYSTEM_ALARM_CALLBACK_ACE_TYPE   = (0Eh)
SYSTEM_AUDIT_CALLBACK_OBJECT_ACE_TYPE = (0Fh)
SYSTEM_ALARM_CALLBACK_OBJECT_ACE_TYPE = (10h)
ACCESS_MAX_MS_V5_ACE_TYPE        = (10h)
SE_RM_CONTROL_VALID              = (4000h)
SecurityAnonymous                = 0
SecurityIdentification           = 1
SecurityImpersonation            = 2
SecurityDelegation               = 3
SECURITY_MAX_IMPERSONATION_LEVEL = SecurityDelegation
SECURITY_MIN_IMPERSONATION_LEVEL = SecurityAnonymous
DEFAULT_IMPERSONATION_LEVEL      = SecurityImpersonation
TOKEN_AUDIT_SUCCESS_INCLUDE      = 1h
TOKEN_AUDIT_SUCCESS_EXCLUDE      = 2h
TOKEN_AUDIT_FAILURE_INCLUDE      = 4h
TOKEN_AUDIT_FAILURE_EXCLUDE      = 8h
DISABLE_MAX_PRIVILEGE            = 1h
SANDBOX_INERT                    = 2h
PROTECTED_DACL_SECURITY_INFORMATION = (80000000h)
PROTECTED_SACL_SECURITY_INFORMATION = (40000000h)
UNPROTECTED_DACL_SECURITY_INFORMATION = (20000000h)
UNPROTECTED_SACL_SECURITY_INFORMATION = (10000000h)
PROCESS_SUSPEND_RESUME           = (0800)
FLS_MAXIMUM_AVAILABLE            = 128
QUOTA_LIMITS_HARDWS_MIN_ENABLE   = 00000001h
QUOTA_LIMITS_HARDWS_MIN_DISABLE  = 00000002h
QUOTA_LIMITS_HARDWS_MAX_ENABLE   = 00000004h
QUOTA_LIMITS_HARDWS_MAX_DISABLE  = 00000008h
JOB_OBJECT_TERMINATE_AT_END_OF_JOB = 0
JOB_OBJECT_POST_AT_END_OF_JOB    = 1
JOB_OBJECT_MSG_END_OF_JOB_TIME   = 1
JOB_OBJECT_MSG_END_OF_PROCESS_TIME = 2
JOB_OBJECT_MSG_ACTIVE_PROCESS_LIMIT = 3
JOB_OBJECT_MSG_ACTIVE_PROCESS_ZERO = 4
JOB_OBJECT_MSG_NEW_PROCESS       = 6
JOB_OBJECT_MSG_EXIT_PROCESS      = 7
JOB_OBJECT_MSG_ABNORMAL_EXIT_PROCESS = 8
JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT = 9
JOB_OBJECT_MSG_JOB_MEMORY_LIMIT  = 10
JOB_OBJECT_LIMIT_WORKINGSET      = 00000001h
JOB_OBJECT_LIMIT_PROCESS_TIME    = 00000002h
JOB_OBJECT_LIMIT_JOB_TIME        = 00000004h
JOB_OBJECT_LIMIT_ACTIVE_PROCESS  = 00000008h
JOB_OBJECT_LIMIT_AFFINITY        = 00000010h
JOB_OBJECT_LIMIT_PRIORITY_CLASS  = 00000020h
JOB_OBJECT_LIMIT_PRESERVE_JOB_TIME = 00000040h
JOB_OBJECT_LIMIT_SCHEDULING_CLASS = 00000080h
JOB_OBJECT_LIMIT_PROCESS_MEMORY  = 00000100h
JOB_OBJECT_LIMIT_JOB_MEMORY      = 00000200h
JOB_OBJECT_LIMIT_DIE_ON_UNHANDLED_EXCEPTION = 00000400h
JOB_OBJECT_LIMIT_BREAKAWAY_OK    = 00000800h
JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK = 00001000h
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE = 00002000h
JOB_OBJECT_LIMIT_RESERVED2       = 00004000h
JOB_OBJECT_LIMIT_RESERVED3       = 00008000h
JOB_OBJECT_LIMIT_RESERVED4       = 00010000h
JOB_OBJECT_LIMIT_RESERVED5       = 00020000h
JOB_OBJECT_LIMIT_RESERVED6       = 00040000h
JOB_OBJECT_LIMIT_VALID_FLAGS     = 0007ffffh
JOB_OBJECT_BASIC_LIMIT_VALID_FLAGS = 000000ffh
JOB_OBJECT_EXTENDED_LIMIT_VALID_FLAGS = 00003fffh
JOB_OBJECT_RESERVED_LIMIT_VALID_FLAGS = 0007ffffh
JOB_OBJECT_UILIMIT_NONE          = 00000000h
JOB_OBJECT_UILIMIT_HANDLES       = 00000001h
JOB_OBJECT_UILIMIT_READCLIPBOARD = 00000002h
JOB_OBJECT_UILIMIT_WRITECLIPBOARD = 00000004h
JOB_OBJECT_UILIMIT_SYSTEMPARAMETERS = 00000008h
JOB_OBJECT_UILIMIT_DISPLAYSETTINGS = 00000010h
JOB_OBJECT_UILIMIT_GLOBALATOMS   = 00000020h
JOB_OBJECT_UILIMIT_DESKTOP       = 00000040h
JOB_OBJECT_UILIMIT_EXITWINDOWS   = 00000080h
JOB_OBJECT_UILIMIT_ALL           = 000000FFh
JOB_OBJECT_UI_VALID_FLAGS        = 000000FFh
JOB_OBJECT_SECURITY_NO_ADMIN     = 00000001h
JOB_OBJECT_SECURITY_RESTRICTED_TOKEN = 00000002h
JOB_OBJECT_SECURITY_ONLY_TOKEN   = 00000004h
JOB_OBJECT_SECURITY_FILTER_TOKENS = 00000008h
JOB_OBJECT_SECURITY_VALID_FLAGS  = 0000000fh
LTP_PC_SMT                       = 1h
PROCESSOR_INTEL_IA64             = 2200
PROCESSOR_AMD_X8664              = 8664
PROCESSOR_OPTIL                  = 494fh
PROCESSOR_ARCHITECTURE_MSIL      = 8
PROCESSOR_ARCHITECTURE_AMD64     = 9
PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 = 10
PF_3DNOW_INSTRUCTIONS_AVAILABLE  = 7
PF_RDTSC_INSTRUCTION_AVAILABLE   = 8
PF_PAE_ENABLED                   = 9
PF_XMMI64_INSTRUCTIONS_AVAILABLE = 10
MEM_WRITE_WATCH                  = 200000h
MEM_PHYSICAL                     = 400000h
MEM_LARGE_PAGES                  = 20000000h
WRITE_WATCH_FLAG_RESET           = 01h
FILE_ATTRIBUTE_DEVICE            = 00000040h
FILE_NAMED_STREAMS               = 00040000h
FILE_READ_ONLY_VOLUME            = 00080000h
IO_REPARSE_TAG_FILTER_MANAGER    = (8000000Bh)
POWER_SYSTEM_MAXIMUM             = 7
PDCAP_D0_SUPPORTED               = 00000001h
PDCAP_D1_SUPPORTED               = 00000002h
PDCAP_D2_SUPPORTED               = 00000004h
PDCAP_D3_SUPPORTED               = 00000008h
PDCAP_WAKE_FROM_D0_SUPPORTED     = 00000010h
PDCAP_WAKE_FROM_D1_SUPPORTED     = 00000020h
PDCAP_WAKE_FROM_D2_SUPPORTED     = 00000040h
PDCAP_WAKE_FROM_D3_SUPPORTED     = 00000080h
PDCAP_WARM_EJECT_SUPPORTED       = 00000100h
POWER_ACTION_QUERY_ALLOWED       = 00000001h
POWER_ACTION_UI_ALLOWED          = 00000002h
POWER_ACTION_OVERRIDE_APPS       = 00000004h
POWER_ACTION_LIGHTEST_FIRST      = 10000000h
POWER_ACTION_LOCK_CONSOLE        = 20000000h
POWER_ACTION_DISABLE_WAKES       = 40000000h
POWER_ACTION_CRITICAL            = 80000000h
POWER_LEVEL_USER_NOTIFY_TEXT     = 00000001h
POWER_LEVEL_USER_NOTIFY_SOUND    = 00000002h
POWER_LEVEL_USER_NOTIFY_EXEC     = 00000004h
POWER_USER_NOTIFY_BUTTON         = 00000008h
POWER_USER_NOTIFY_SHUTDOWN       = 00000010h
POWER_FORCE_TRIGGER_RESET        = 80000000h
NUM_DISCHARGE_POLICIES           = 4
DISCHARGE_POLICY_CRITICAL        = 0
DISCHARGE_POLICY_LOW             = 1
PO_THROTTLE_NONE                 = 0
PO_THROTTLE_CONSTANT             = 1
PO_THROTTLE_DEGRADE              = 2
PO_THROTTLE_ADAPTIVE             = 3
PO_THROTTLE_MAXIMUM              = 4
IMAGE_FILE_MACHINE_SH3DSP        = 01a3h
IMAGE_FILE_MACHINE_SH5           = 01a8h
IMAGE_FILE_MACHINE_AM33          = 01d3h
IMAGE_FILE_MACHINE_POWERPCFP     = 01f1h
IMAGE_FILE_MACHINE_TRICORE       = 0520h
IMAGE_FILE_MACHINE_CEF           = 0CEFh
IMAGE_FILE_MACHINE_EBC           = 0EBCh
IMAGE_FILE_MACHINE_AMD64         = 8664h
IMAGE_FILE_MACHINE_M32R          = 9041h
IMAGE_FILE_MACHINE_CEE           = 0C0EEh
IMAGE_SUBSYSTEM_EFI_APPLICATION  = 10
IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER = 11
IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER = 12
IMAGE_SUBSYSTEM_EFI_ROM          = 13
IMAGE_SUBSYSTEM_XBOX             = 14
IMAGE_DLLCHARACTERISTICS_NO_ISOLATION = 0200h
IMAGE_DLLCHARACTERISTICS_NO_SEH  = 0400h
IMAGE_DLLCHARACTERISTICS_NO_BIND = 0800h
IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE = 8000h
IMAGE_SCN_ALIGN_MASK             = 00F00000h
IMAGE_SYM_SECTION_MAX            = 0FEFFh
IMAGE_SYM_CLASS_CLR_TOKEN        = 006Bh
IMAGE_REL_I386_TOKEN             = 000Ch
IMAGE_REL_I386_SECREL7           = 000Dh
IMAGE_REL_MIPS_ABSOLUTE          = 0000h
IMAGE_REL_MIPS_REFHALF           = 0001h
IMAGE_REL_MIPS_REFWORD           = 0002h
IMAGE_REL_MIPS_JMPADDR           = 0003h
IMAGE_REL_MIPS_REFHI             = 0004h
IMAGE_REL_MIPS_REFLO             = 0005h
IMAGE_REL_MIPS_GPREL             = 0006h
IMAGE_REL_MIPS_LITERAL           = 0007h
IMAGE_REL_MIPS_SECTION           = 000Ah
IMAGE_REL_MIPS_SECREL            = 000Bh
IMAGE_REL_MIPS_SECRELLO          = 000Ch
IMAGE_REL_MIPS_SECRELHI          = 000Dh
IMAGE_REL_MIPS_TOKEN             = 000Eh
IMAGE_REL_MIPS_JMPADDR16         = 0010h
IMAGE_REL_MIPS_REFWORDNB         = 0022h
IMAGE_REL_MIPS_PAIR              = 0025h
IMAGE_REL_ALPHA_ABSOLUTE         = 0000h
IMAGE_REL_ALPHA_REFLONG          = 0001h
IMAGE_REL_ALPHA_REFQUAD          = 0002h
IMAGE_REL_ALPHA_GPREL32          = 0003h
IMAGE_REL_ALPHA_LITERAL          = 0004h
IMAGE_REL_ALPHA_LITUSE           = 0005h
IMAGE_REL_ALPHA_GPDISP           = 0006h
IMAGE_REL_ALPHA_BRADDR           = 0007h
IMAGE_REL_ALPHA_HINT             = 0008h
IMAGE_REL_ALPHA_INLINE_REFLONG   = 0009h
IMAGE_REL_ALPHA_REFHI            = 000Ah
IMAGE_REL_ALPHA_REFLO            = 000Bh
IMAGE_REL_ALPHA_PAIR             = 000Ch
IMAGE_REL_ALPHA_MATCH            = 000Dh
IMAGE_REL_ALPHA_SECTION          = 000Eh
IMAGE_REL_ALPHA_SECREL           = 000Fh
IMAGE_REL_ALPHA_REFLONGNB        = 0010h
IMAGE_REL_ALPHA_SECRELLO         = 0011h
IMAGE_REL_ALPHA_SECRELHI         = 0012h
IMAGE_REL_ALPHA_REFQ3            = 0013h
IMAGE_REL_ALPHA_REFQ2            = 0014h
IMAGE_REL_ALPHA_REFQ1            = 0015h
IMAGE_REL_ALPHA_GPRELLO          = 0016h
IMAGE_REL_ALPHA_GPRELHI          = 0017h
IMAGE_REL_PPC_ABSOLUTE           = 0000h
IMAGE_REL_PPC_ADDR64             = 0001h
IMAGE_REL_PPC_ADDR32             = 0002h
IMAGE_REL_PPC_ADDR24             = 0003h
IMAGE_REL_PPC_ADDR16             = 0004h
IMAGE_REL_PPC_ADDR14             = 0005h
IMAGE_REL_PPC_REL24              = 0006h
IMAGE_REL_PPC_REL14              = 0007h
IMAGE_REL_PPC_TOCREL16           = 0008h
IMAGE_REL_PPC_TOCREL14           = 0009h
IMAGE_REL_PPC_ADDR32NB           = 000Ah
IMAGE_REL_PPC_SECREL             = 000Bh
IMAGE_REL_PPC_SECTION            = 000Ch
IMAGE_REL_PPC_IFGLUE             = 000Dh
IMAGE_REL_PPC_IMGLUE             = 000Eh
IMAGE_REL_PPC_SECREL16           = 000Fh
IMAGE_REL_PPC_REFHI              = 0010h
IMAGE_REL_PPC_REFLO              = 0011h
IMAGE_REL_PPC_PAIR               = 0012h
IMAGE_REL_PPC_SECRELLO           = 0013h
IMAGE_REL_PPC_SECRELHI           = 0014h
IMAGE_REL_PPC_GPREL              = 0015h
IMAGE_REL_PPC_TOKEN              = 0016h
IMAGE_REL_PPC_TYPEMASK           = 00FFh
IMAGE_REL_PPC_NEG                = 0100h
IMAGE_REL_PPC_BRTAKEN            = 0200h
IMAGE_REL_PPC_BRNTAKEN           = 0400h
IMAGE_REL_PPC_TOCDEFN            = 0800h
IMAGE_REL_SH3_ABSOLUTE           = 0000h
IMAGE_REL_SH3_DIRECT16           = 0001h
IMAGE_REL_SH3_DIRECT32           = 0002h
IMAGE_REL_SH3_DIRECT8            = 0003h
IMAGE_REL_SH3_DIRECT8_WORD       = 0004h
IMAGE_REL_SH3_DIRECT8_LONG       = 0005h
IMAGE_REL_SH3_DIRECT4            = 0006h
IMAGE_REL_SH3_DIRECT4_WORD       = 0007h
IMAGE_REL_SH3_DIRECT4_LONG       = 0008h
IMAGE_REL_SH3_PCREL8_WORD        = 0009h
IMAGE_REL_SH3_PCREL8_LONG        = 000Ah
IMAGE_REL_SH3_PCREL12_WORD       = 000Bh
IMAGE_REL_SH3_STARTOF_SECTION    = 000Ch
IMAGE_REL_SH3_SIZEOF_SECTION     = 000Dh
IMAGE_REL_SH3_SECTION            = 000Eh
IMAGE_REL_SH3_SECREL             = 000Fh
IMAGE_REL_SH3_DIRECT32_NB        = 0010h
IMAGE_REL_SH3_GPREL4_LONG        = 0011h
IMAGE_REL_SH3_TOKEN              = 0012h
IMAGE_REL_ARM_ABSOLUTE           = 0000h
IMAGE_REL_ARM_ADDR32             = 0001h
IMAGE_REL_ARM_ADDR32NB           = 0002h
IMAGE_REL_ARM_BRANCH24           = 0003h
IMAGE_REL_ARM_BRANCH11           = 0004h
IMAGE_REL_ARM_TOKEN              = 0005h
IMAGE_REL_ARM_GPREL12            = 0006h
IMAGE_REL_ARM_GPREL7             = 0007h
IMAGE_REL_ARM_BLX24              = 0008h
IMAGE_REL_ARM_BLX11              = 0009h
IMAGE_REL_ARM_SECTION            = 000Eh
IMAGE_REL_ARM_SECREL             = 000Fh
IMAGE_REL_AM_ABSOLUTE            = 0000h
IMAGE_REL_AM_ADDR32              = 0001h
IMAGE_REL_AM_ADDR32NB            = 0002h
IMAGE_REL_AM_CALL32              = 0003h
IMAGE_REL_AM_FUNCINFO            = 0004h
IMAGE_REL_AM_REL32_1             = 0005h
IMAGE_REL_AM_REL32_2             = 0006h
IMAGE_REL_AM_SECREL              = 0007h
IMAGE_REL_AM_SECTION             = 0008h
IMAGE_REL_AM_TOKEN               = 0009h
IMAGE_REL_AMD64_ABSOLUTE         = 0000h
IMAGE_REL_AMD64_ADDR64           = 0001h
IMAGE_REL_AMD64_ADDR32           = 0002h
IMAGE_REL_AMD64_ADDR32NB         = 0003h
IMAGE_REL_AMD64_REL32            = 0004h
IMAGE_REL_AMD64_REL32_1          = 0005h
IMAGE_REL_AMD64_REL32_2          = 0006h
IMAGE_REL_AMD64_REL32_3          = 0007h
IMAGE_REL_AMD64_REL32_4          = 0008h
IMAGE_REL_AMD64_REL32_5          = 0009h
IMAGE_REL_AMD64_SECTION          = 000Ah
IMAGE_REL_AMD64_SECREL           = 000Bh
IMAGE_REL_AMD64_SECREL7          = 000Ch
IMAGE_REL_AMD64_TOKEN            = 000Dh
IMAGE_REL_AMD64_SREL32           = 000Eh
IMAGE_REL_AMD64_PAIR             = 000Fh
IMAGE_REL_AMD64_SSPAN32          = 0010h
IMAGE_REL_IA64_ABSOLUTE          = 0000h
IMAGE_REL_IA64_IMM14             = 0001h
IMAGE_REL_IA64_IMM22             = 0002h
IMAGE_REL_IA64_IMM64             = 0003h
IMAGE_REL_IA64_DIR32             = 0004h
IMAGE_REL_IA64_DIR64             = 0005h
IMAGE_REL_IA64_PCREL21B          = 0006h
IMAGE_REL_IA64_PCREL21M          = 0007h
IMAGE_REL_IA64_PCREL21F          = 0008h
IMAGE_REL_IA64_GPREL22           = 0009h
IMAGE_REL_IA64_LTOFF22           = 000Ah
IMAGE_REL_IA64_SECTION           = 000Bh
IMAGE_REL_IA64_SECREL22          = 000Ch
IMAGE_REL_IA64_SECREL64I         = 000Dh
IMAGE_REL_IA64_SECREL32          = 000Eh
IMAGE_REL_IA64_DIR32NB           = 0010h
IMAGE_REL_IA64_SREL14            = 0011h
IMAGE_REL_IA64_SREL22            = 0012h
IMAGE_REL_IA64_SREL32            = 0013h
IMAGE_REL_IA64_UREL32            = 0014h
IMAGE_REL_IA64_PCREL60X          = 0015h
IMAGE_REL_IA64_PCREL60B          = 0016h
IMAGE_REL_IA64_PCREL60F          = 0017h
IMAGE_REL_IA64_PCREL60I          = 0018h
IMAGE_REL_IA64_PCREL60M          = 0019h
IMAGE_REL_IA64_IMMGPREL64        = 001Ah
IMAGE_REL_IA64_TOKEN             = 001Bh
IMAGE_REL_IA64_GPREL32           = 001Ch
IMAGE_REL_IA64_ADDEND            = 001Fh
IMAGE_REL_CEF_ABSOLUTE           = 0000h
IMAGE_REL_CEF_ADDR32             = 0001h
IMAGE_REL_CEF_ADDR64             = 0002h
IMAGE_REL_CEF_ADDR32NB           = 0003h
IMAGE_REL_CEF_SECTION            = 0004h
IMAGE_REL_CEF_SECREL             = 0005h
IMAGE_REL_CEF_TOKEN              = 0006h
IMAGE_REL_CEE_ABSOLUTE           = 0000h
IMAGE_REL_CEE_ADDR32             = 0001h
IMAGE_REL_CEE_ADDR64             = 0002h
IMAGE_REL_CEE_ADDR32NB           = 0003h
IMAGE_REL_CEE_SECTION            = 0004h
IMAGE_REL_CEE_SECREL             = 0005h
IMAGE_REL_CEE_TOKEN              = 0006h
IMAGE_REL_M32R_ABSOLUTE          = 0000h
IMAGE_REL_M32R_ADDR32            = 0001h
IMAGE_REL_M32R_ADDR32NB          = 0002h
IMAGE_REL_M32R_ADDR24            = 0003h
IMAGE_REL_M32R_GPREL16           = 0004h
IMAGE_REL_M32R_PCREL24           = 0005h
IMAGE_REL_M32R_PCREL16           = 0006h
IMAGE_REL_M32R_PCREL8            = 0007h
IMAGE_REL_M32R_REFHALF           = 0008h
IMAGE_REL_M32R_REFHI             = 0009h
IMAGE_REL_M32R_REFLO             = 000Ah
IMAGE_REL_M32R_PAIR              = 000Bh
IMAGE_REL_M32R_SECTION           = 000Ch
IMAGE_REL_M32R_SECREL32          = 000Dh
IMAGE_REL_M32R_TOKEN             = 000Eh
EMARCH_ENC_I17_IMM7B_INST_WORD_X = 3
EMARCH_ENC_I17_IMM7B_SIZE_X      = 7
EMARCH_ENC_I17_IMM7B_INST_WORD_POS_X = 4
EMARCH_ENC_I17_IMM7B_VAL_POS_X   = 0
EMARCH_ENC_I17_IMM9D_INST_WORD_X = 3
EMARCH_ENC_I17_IMM9D_SIZE_X      = 9
EMARCH_ENC_I17_IMM9D_INST_WORD_POS_X = 18
EMARCH_ENC_I17_IMM9D_VAL_POS_X   = 7
EMARCH_ENC_I17_IMM5C_INST_WORD_X = 3
EMARCH_ENC_I17_IMM5C_SIZE_X      = 5
EMARCH_ENC_I17_IMM5C_INST_WORD_POS_X = 13
EMARCH_ENC_I17_IMM5C_VAL_POS_X   = 16
EMARCH_ENC_I17_IC_INST_WORD_X    = 3
EMARCH_ENC_I17_IC_SIZE_X         = 1
EMARCH_ENC_I17_IC_INST_WORD_POS_X = 12
EMARCH_ENC_I17_IC_VAL_POS_X      = 21
EMARCH_ENC_I17_IMM41a_INST_WORD_X = 1
EMARCH_ENC_I17_IMM41a_SIZE_X     = 10
EMARCH_ENC_I17_IMM41a_INST_WORD_POS_X = 14
EMARCH_ENC_I17_IMM41a_VAL_POS_X  = 22
EMARCH_ENC_I17_IMM41b_INST_WORD_X = 1
EMARCH_ENC_I17_IMM41b_SIZE_X     = 8
EMARCH_ENC_I17_IMM41b_INST_WORD_POS_X = 24
EMARCH_ENC_I17_IMM41b_VAL_POS_X  = 32
EMARCH_ENC_I17_IMM41c_INST_WORD_X = 2
EMARCH_ENC_I17_IMM41c_SIZE_X     = 23
EMARCH_ENC_I17_IMM41c_INST_WORD_POS_X = 0
EMARCH_ENC_I17_IMM41c_VAL_POS_X  = 40
EMARCH_ENC_I17_SIGN_INST_WORD_X  = 3
EMARCH_ENC_I17_SIGN_SIZE_X       = 1
EMARCH_ENC_I17_SIGN_INST_WORD_POS_X = 27
EMARCH_ENC_I17_SIGN_VAL_POS_X    = 63

SLIST_ENTRY struct
    Next PVOID ?
SLIST_ENTRY ends
TYPEDEF PSLIST_ENTRY, PVOID

VER_EQUAL                        = 1
VER_GREATER                      = 2
VER_GREATER_EQUAL                = 3
VER_LESS                         = 4
VER_LESS_EQUAL                   = 5
VER_AND                          = 6
VER_OR                           = 7
VER_CONDITION_MASK               = 7
VER_NUM_BITS_PER_CONDITION_MASK  = 3
VER_MINORVERSION                 = 0000001h
VER_MAJORVERSION                 = 0000002h
VER_BUILDNUMBER                  = 0000004h
VER_PLATFORMID                   = 0000008h
VER_SERVICEPACKMINOR             = 0000010h
VER_SERVICEPACKMAJOR             = 0000020h
VER_SUITENAME                    = 0000040h
VER_PRODUCT_TYPE                 = 0000080h
VER_NT_WORKSTATION               = 0000001h
VER_NT_DOMAIN_CONTROLLER         = 0000002h
VER_NT_SERVER                    = 0000003h
RTL_VRF_FLG_FULL_PAGE_HEAP       = 00000001h
RTL_VRF_FLG_RESERVED_DONOTUSE    = 00000002h
RTL_VRF_FLG_HANDLE_CHECKS        = 00000004h
RTL_VRF_FLG_STACK_CHECKS         = 00000008h
RTL_VRF_FLG_APPCOMPAT_CHECKS     = 00000010h
RTL_VRF_FLG_TLS_CHECKS           = 00000020h
RTL_VRF_FLG_DIRTY_STACKS         = 00000040h
RTL_VRF_FLG_RPC_CHECKS           = 00000080h
RTL_VRF_FLG_COM_CHECKS           = 00000100h
RTL_VRF_FLG_DANGEROUS_APIS       = 00000200h
RTL_VRF_FLG_RACE_CHECKS          = 00000400h
RTL_VRF_FLG_DEADLOCK_CHECKS      = 00000800h
RTL_VRF_FLG_FIRST_CHANCE_EXCEPTION_CHECKS = 00001000h
RTL_VRF_FLG_VIRTUAL_MEM_CHECKS   = 00002000h
RTL_VRF_FLG_ENABLE_LOGGING       = 00004000h
RTL_VRF_FLG_FAST_FILL_HEAP       = 00008000h
RTL_VRF_FLG_VIRTUAL_SPACE_TRACKING = 00010000h
RTL_VRF_FLG_ENABLED_SYSTEM_WIDE  = 00020000h
RTL_VRF_FLG_MISCELLANEOUS_CHECKS = 00020000h
RTL_VRF_FLG_LOCK_CHECKS          = 00040000h
APPLICATION_VERIFIER_INTERNAL_ERROR = 80000000h
APPLICATION_VERIFIER_INTERNAL_WARNING = 40000000h
APPLICATION_VERIFIER_NO_BREAK    = 20000000h
APPLICATION_VERIFIER_CONTINUABLE_BREAK = 10000000h
APPLICATION_VERIFIER_UNKNOWN_ERROR = 0001h
APPLICATION_VERIFIER_ACCESS_VIOLATION = 0002h
APPLICATION_VERIFIER_UNSYNCHRONIZED_ACCESS = 0003h
APPLICATION_VERIFIER_EXTREME_SIZE_REQUEST = 0004h
APPLICATION_VERIFIER_BAD_HEAP_HANDLE = 0005h
APPLICATION_VERIFIER_SWITCHED_HEAP_HANDLE = 0006h
APPLICATION_VERIFIER_DOUBLE_FREE = 0007h
APPLICATION_VERIFIER_CORRUPTED_HEAP_BLOCK = 0008h
APPLICATION_VERIFIER_DESTROY_PROCESS_HEAP = 0009h
APPLICATION_VERIFIER_UNEXPECTED_EXCEPTION = 000Ah
APPLICATION_VERIFIER_STACK_OVERFLOW = 000Bh
APPLICATION_VERIFIER_TERMINATE_THREAD_CALL = 0100h
APPLICATION_VERIFIER_INVALID_EXIT_PROCESS_CALL = 0101h
APPLICATION_VERIFIER_EXIT_THREAD_OWNS_LOCK = 0200h
APPLICATION_VERIFIER_LOCK_IN_UNLOADED_DLL = 0201h
APPLICATION_VERIFIER_LOCK_IN_FREED_HEAP = 0202h
APPLICATION_VERIFIER_LOCK_DOUBLE_INITIALIZE = 0203h
APPLICATION_VERIFIER_LOCK_IN_FREED_MEMORY = 0204h
APPLICATION_VERIFIER_LOCK_CORRUPTED = 0205h
APPLICATION_VERIFIER_LOCK_INVALID_OWNER = 0206h
APPLICATION_VERIFIER_LOCK_INVALID_RECURSION_COUNT = 0207h
APPLICATION_VERIFIER_LOCK_INVALID_LOCK_COUNT = 0208h
APPLICATION_VERIFIER_LOCK_OVER_RELEASED = 0209h
APPLICATION_VERIFIER_LOCK_NOT_INITIALIZED = 0210h
APPLICATION_VERIFIER_LOCK_ALREADY_INITIALIZED = 0211h
APPLICATION_VERIFIER_INVALID_HANDLE = 0300h
APPLICATION_VERIFIER_INVALID_TLS_VALUE = 0301h
APPLICATION_VERIFIER_INCORRECT_WAIT_CALL = 0302h
APPLICATION_VERIFIER_NULL_HANDLE = 0303h
APPLICATION_VERIFIER_WAIT_IN_DLLMAIN = 0304h
APPLICATION_VERIFIER_COM_ERROR   = 0400h
APPLICATION_VERIFIER_COM_API_IN_DLLMAIN = 0401h
APPLICATION_VERIFIER_COM_UNHANDLED_EXCEPTION = 0402h
APPLICATION_VERIFIER_COM_UNBALANCED_COINIT = 0403h
APPLICATION_VERIFIER_COM_UNBALANCED_OLEINIT = 0404h
APPLICATION_VERIFIER_COM_UNBALANCED_SWC = 0405h
APPLICATION_VERIFIER_COM_NULL_DACL = 0406h
APPLICATION_VERIFIER_COM_UNSAFE_IMPERSONATION = 0407h
APPLICATION_VERIFIER_COM_SMUGGLED_WRAPPER = 0408h
APPLICATION_VERIFIER_COM_SMUGGLED_PROXY = 0409h
APPLICATION_VERIFIER_COM_CF_SUCCESS_WITH_NULL = 040Ah
APPLICATION_VERIFIER_COM_GCO_SUCCESS_WITH_NULL = 040Bh
APPLICATION_VERIFIER_COM_OBJECT_IN_FREED_MEMORY = 040Ch
APPLICATION_VERIFIER_COM_OBJECT_IN_UNLOADED_DLL = 040Dh
APPLICATION_VERIFIER_COM_VTBL_IN_FREED_MEMORY = 040Eh
APPLICATION_VERIFIER_COM_VTBL_IN_UNLOADED_DLL = 040Fh
APPLICATION_VERIFIER_COM_HOLDING_LOCKS_ON_CALL = 0410h
APPLICATION_VERIFIER_RPC_ERROR   = 0500h
APPLICATION_VERIFIER_INVALID_FREEMEM = 0600h
APPLICATION_VERIFIER_INVALID_ALLOCMEM = 0601h
APPLICATION_VERIFIER_INVALID_MAPVIEW = 0602h
APPLICATION_VERIFIER_PROBE_INVALID_ADDRESS = 0603h
APPLICATION_VERIFIER_PROBE_FREE_MEM = 0604h
APPLICATION_VERIFIER_PROBE_GUARD_PAGE = 0605h
APPLICATION_VERIFIER_PROBE_NULL  = 0606h
APPLICATION_VERIFIER_PROBE_INVALID_START_OR_SIZE = 0607h
SEF_AVOID_OWNER_CHECK            = 10h
SEF_DEFAULT_OWNER_FROM_PARENT    = 20h
SEF_DEFAULT_GROUP_FROM_PARENT    = 40h
WT_EXECUTEONLYONCE               = 00000008h
WT_EXECUTEINTIMERTHREAD          = 00000020h
WT_EXECUTELONGFUNCTION           = 00000010h
WT_EXECUTEINPERSISTENTIOTHREAD   = 00000040h
WT_EXECUTEINPERSISTENTTHREAD     = 00000080h
WT_TRANSFER_IMPERSONATION        = 00000100h
;ACTIVATIONCONTEXTINFOCLASS       = ACTIVATION_CONTEXT_INFO_CLASS
ACTIVATION_CONTEXT_PATH_TYPE_NONE = (1)
ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE = (2)
ACTIVATION_CONTEXT_PATH_TYPE_URL = (3)
ACTIVATION_CONTEXT_PATH_TYPE_ASSEMBLYREF = (4)
;_ASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION = _ASSEMBLY_FILE_DETAILED_INFORMATION
;ASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION = ASSEMBLY_FILE_DETAILED_INFORMATION
;PASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION = PASSEMBLY_FILE_DETAILED_INFORMATION
;PCASSEMBLY_DLL_REDIRECTION_DETAILED_INFORMATION = PCASSEMBLY_FILE_DETAILED_INFORMATION
DLL_PROCESS_VERIFIER             = 4
KEY_WOW64_32KEY                  = (0200)
KEY_WOW64_64KEY                  = (0100)
KEY_WOW64_RES                    = (0300)
REG_STANDARD_FORMAT              = 1
REG_LATEST_FORMAT                = 2
REG_NO_COMPRESSION               = 4
REG_FORCE_RESTORE                = (00000008h)
REG_FORCE_UNLOAD                 = 1
REG_QWORD                        = ( 11 )
REG_QWORD_LITTLE_ENDIAN          = ( 11 )
TAPE_QUERY_DRIVE_PARAMETERS      = 0
TAPE_QUERY_MEDIA_CAPACITY        = 1
TAPE_CHECK_FOR_DRIVE_PROBLEM     = 2
TAPE_QUERY_IO_ERROR_DATA         = 3
TAPE_QUERY_DEVICE_ERROR_DATA     = 4
ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION = (1)
ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION = (2)
ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION = (3)
ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION = (4)
ACTIVATION_CONTEXT_SECTION_COM_INTERFACE_REDIRECTION = (5)
ACTIVATION_CONTEXT_SECTION_COM_TYPE_LIBRARY_REDIRECTION = (6)
ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION = (7)
ACTIVATION_CONTEXT_SECTION_GLOBAL_OBJECT_RENAME_TABLE = (8)
ACTIVATION_CONTEXT_SECTION_CLR_SURROGATES = (9)
MAXLONGLONG                      = 7fffffffffffffffh
ANSI_NULL                        = 0
UNICODE_NULL                     = 0
UNICODE_STRING_MAX_BYTES         = 065534
UNICODE_STRING_MAX_CHARS         = 32767
_MM_HINT_T0                      = 1
_MM_HINT_T1                      = 2
_MM_HINT_T2                      = 3
_MM_HINT_NTA                     = 0
CONTEXT_AMD64                    = 100000h
CONTEXT_ALL                      = (CONTEXT_CONTROL or CONTEXT_INTEGER or CONTEXT_SEGMENTS or CONTEXT_FLOATING_POINT or CONTEXT_DEBUG_REGISTERS)
INITIAL_MXCSR                    = 1f80h
CONTEXT_ALPHA                    = 00020000h
CONTEXT_R4000                    = 00010000h
CONTEXT_IA64                     = 00080000h
SE_PRIVILEGE_REMOVED             = 00000004h
IMAGE_ORDINAL_FLAG64             = 8000000000000000h
IMAGE_DEBUG_TYPE_CLSID           = 11
NON_PAGED_DEBUG_SIGNATURE        = 494Eh
COMPRESSION_ENGINE_HIBER         = 0200h

PS_RATE_PHASE_MASK               = (1 SHL (PS_RATE_PHASE_BITS  - 1))

  ; Structures from WinBase.h

OVERLAPPED_ENTRY struct
   lpCompletionKey        DWORD ?
   lpOverlapped           OVERLAPPED <>
   Internal               DWORD ?
   dwNumberOfBytesTransferred DWORD ?
OVERLAPPED_ENTRY ends

JIT_DEBUG_INFO struct
   dwSize                 DWORD ?
   dwProcessorArchitecture DWORD ?
   dwThreadID             DWORD ?
   dwReserved0            DWORD ?
   lpExceptionAddress     QWORD ?
   lpExceptionRecord      QWORD ?
   lpContextRecord        QWORD ?
JIT_DEBUG_INFO ends

MEMORYSTATUSEX struct
   dwLength               DWORD ?
   dwMemoryLoad           DWORD ?
   ullTotalPhys           QWORD ?
   ullAvailPhys           QWORD ?
   ullTotalPageFile       QWORD ?
   ullAvailPageFile       QWORD ?
   ullTotalVirtual        QWORD ?
   ullAvailVirtual        QWORD ?
   ullAvailExtendedVirtual QWORD ?
MEMORYSTATUSEX ends

DYNAMIC_TIME_ZONE_INFORMATION struct
   Bias                   DWORD ?
   StandardName           WORD 32 dup (?)
   StandardDate           SYSTEMTIME <>
   StandardBias           DWORD ?
   DaylightName           WORD 32 dup (?)
   DaylightDate           SYSTEMTIME <>
   DaylightBias           DWORD ?
   TimeZoneKeyName        WORD 128 dup (?)
   DynamicDaylightTimeDisabled BYTE ?
DYNAMIC_TIME_ZONE_INFORMATION ends

WIN32_FIND_STREAM_DATA struct
   StreamSize             QWORD ?
   cStreamName WORD MAX_PATH + 36 dup (?)
WIN32_FIND_STREAM_DATA ends

ACTCTXA struct
   cbSize                 DWORD ?
   dwFlags                DWORD ?
   lpSource               DWORD ?
   wProcessorArchitecture WORD ?
   wLangId                WORD ?
   lpAssemblyDirectory    DWORD ?
   lpResourceName         DWORD ?
   lpApplicationName      DWORD ?
   hModule                DWORD ?
ACTCTXA ends

ACTCTXW struct
   cbSize                 DWORD ?
   dwFlags                DWORD ?
   lpSource               DWORD ?
   wProcessorArchitecture WORD ?
   wLangId                WORD ?
   lpAssemblyDirectory    DWORD ?
   lpResourceName         DWORD ?
   lpApplicationName      DWORD ?
   hModule                DWORD ?
ACTCTXW ends

ACTCTX_SECTION_KEYED_DATA_2600 struct
   cbSize                 DWORD ?
   ulDataFormatVersion    DWORD ?
   lpData                 DWORD ?
   ulLength               DWORD ?
   lpSectionGlobalData    DWORD ?
   ulSectionGlobalDataLength DWORD ?
   lpSectionBase          DWORD ?
   ulSectionTotalLength   DWORD ?
   hActCtx                DWORD ?
   ulAssemblyRosterIndex  DWORD ?
ACTCTX_SECTION_KEYED_DATA_2600 ends

ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA struct
   lpInformation          DWORD ?
   lpSectionBase          DWORD ?
   ulSectionLength        DWORD ?
   lpSectionGlobalDataBase DWORD ?
   ulSectionGlobalDataLength DWORD ?
ACTCTX_SECTION_KEYED_DATA_ASSEMBLY_METADATA ends

ACTIVATION_CONTEXT_BASIC_INFORMATION struct
   hActCtx                DWORD ?
   dwFlags                DWORD ?
ACTIVATION_CONTEXT_BASIC_INFORMATION ends

FILE_BASIC_INFO struct
   CreationTime           QWORD ?
   LastAccessTime         QWORD ?
   LastWriteTime          QWORD ?
   ChangeTime             QWORD ?
   FileAttributes         DWORD ?
FILE_BASIC_INFO ends

FILE_STANDARD_INFO struct
   AllocationSize         QWORD ?
   EndOfFile              QWORD ?
   NumberOfLinks          DWORD ?
   DeletePending          BYTE ?
   Directory              BYTE ?
FILE_STANDARD_INFO ends

FILE_NAME_INFO struct
   FileNameLength         DWORD ?
   FileName               WORD 1 dup (?)
FILE_NAME_INFO ends

FILE_RENAME_INFO struct
   ReplaceIfExists        BYTE ?
   RootDirectory          DWORD ?
   FileNameLength         DWORD ?
   FileName               WORD 1 dup (?)
FILE_RENAME_INFO ends

FILE_ALLOCATION_INFO struct
   AllocationSize         QWORD ?
FILE_ALLOCATION_INFO ends

FILE_END_OF_FILE_INFO struct
   EndOfFile              QWORD ?
FILE_END_OF_FILE_INFO ends

FILE_STREAM_INFO struct
   NextEntryOffset        DWORD ?
   StreamNameLength       DWORD ?
   StreamSize             QWORD ?
   StreamAllocationSize   QWORD ?
   StreamName             WORD 1 dup (?)
FILE_STREAM_INFO ends

FILE_COMPRESSION_INFO struct
   CompressedFileSize     QWORD ?
   CompressionFormat      WORD ?
   CompressionUnitShift   BYTE ?
   ChunkShift             BYTE ?
   ClusterShift           BYTE ?
   Reserved               BYTE 3 dup (?)
FILE_COMPRESSION_INFO ends

FILE_ATTRIBUTE_TAG_INFO struct
   FileAttributes         DWORD ?
   ReparseTag             DWORD ?
FILE_ATTRIBUTE_TAG_INFO ends

FILE_DISPOSITION_INFO struct
   DeleteFile             BYTE ?
FILE_DISPOSITION_INFO ends

FILE_ID_BOTH_DIR_INFO struct
   NextEntryOffset        DWORD ?
   FileIndex              DWORD ?
   CreationTime           QWORD ?
   LastAccessTime         QWORD ?
   LastWriteTime          QWORD ?
   ChangeTime             QWORD ?
   EndOfFile              QWORD ?
   AllocationSize         QWORD ?
   FileAttributes         DWORD ?
   FileNameLength         DWORD ?
   EaSize                 DWORD ?
   ShortNameLength        BYTE ?
   ShortName              WORD 12 dup (?)
   FileId                 QWORD ?
   FileName               WORD 1 dup (?)
FILE_ID_BOTH_DIR_INFO ends

;;;; end winnt

;;;; imaghlp

; --------------------- Imagehlp.h EQUATES ---------------------

API_VERSION_NUMBER                  = 9
AddrMode1616                        = 0
AddrMode1632                        = 1
AddrModeFlat                        = 3
AddrModeReal                        = 2
BIND_ALL_IMAGES                     = 000000004h
BIND_CACHE_IMPORT_DLLS              = 000000008h
BIND_NO_BOUND_IMPORTS               = 000000001h
BIND_NO_UPDATE                      = 000000002h
BIND_REPORT_64BIT_VA                = 00000010h
CBA_DEBUG_INFO                      = 10000000h
CBA_DEFERRED_SYMBOL_LOAD_CANCEL     = 00000007h
CBA_DEFERRED_SYMBOL_LOAD_COMPLETE   = 000000002h
CBA_DEFERRED_SYMBOL_LOAD_FAILURE    = 000000003h
CBA_DEFERRED_SYMBOL_LOAD_PARTIAL    = 00000020h
CBA_DEFERRED_SYMBOL_LOAD_START      = 000000001h
CBA_DUPLICATE_SYMBOL                = 000000005h
CBA_EVENT                           = 00000010h
CBA_READ_MEMORY                     = 00000006h
CBA_SET_OPTIONS                     = 00000008h
CBA_SYMBOLS_UNLOADED                = 000000004h
CERT_PE_IMAGE_DIGEST_ALL_IMPORT_INFO    =  004h
CERT_PE_IMAGE_DIGEST_DEBUG_INFO     = 001h
CERT_PE_IMAGE_DIGEST_NON_PE_INFO    = 008h
CERT_PE_IMAGE_DIGEST_RESOURCES      = 002h
CERT_SECTION_TYPE_ANY               = 0FFh
CHECKSUM_MAPVIEW_FAILURE            = 3
CHECKSUM_MAP_FAILURE                = 2
CHECKSUM_OPEN_FAILURE               = 1
CHECKSUM_SUCCESS                    = 0
CHECKSUM_UNICODE_FAILURE            = 4
DBHHEADER_DEBUGDIRS                 = 1h
DSLFLAG_MISMATCHED_DBG              = 2h
IMAGEHLP_SYMBOL_INFO_VALUEPRESENT   = 1
IMAGE_SEPARATION                    =  65536
MAX_SYM_NAME                        = 2000
MINIDUMP_MISC1_PROCESS_ID           = 00000001h
MINIDUMP_MISC1_PROCESS_TIMES        = 00000002h
MINIDUMP_VERSION                    = 42899
SLMFLAG_VIRTUAL                     = 1h
SPLITSYM_EXTRACT_ALL                = 000000002h
SPLITSYM_REMOVE_PRIVATE             = 000000001h
SPLITSYM_SYMBOLPATH_IS_SRC          = 000000004h
SSRVACTION_EVENT                    = 3
SSRVACTION_QUERYCANCEL              = 2
SSRVACTION_TRACE                    = 1
SSRVOPT_CALLBACK                    = 0001h
SSRVOPT_DOWNSTREAM_STORE            = 2000h
SSRVOPT_DWORD                       = 0002h
SSRVOPT_DWORDPTR                    = 0004h
SSRVOPT_GUIDPTR                     = 0008h
SSRVOPT_NOCOPY                      = 0040h
SSRVOPT_OLDGUIDPTR                  = 0010h
SSRVOPT_PARAMTYPE                   = 0100h
SSRVOPT_PARENTWIN                   = 0080h
SSRVOPT_PROXY                       = 1000h
SSRVOPT_RESET                       = -1
SSRVOPT_SECURE                      = 0200h
SSRVOPT_SETCONTEXT                  = 0800h
SSRVOPT_TRACE                       = 0400h
SSRVOPT_UNATTENDED                  = 0020h
SYMENUMFLAG_FULLSRCH                = 1
SYMENUMFLAG_SPEEDSRCH               = 2
SYMFLAG_CONSTANT                    = 00000100h
SYMFLAG_EXPORT                      = 00000200h
SYMFLAG_FORWARDER                   = 00000400h
SYMFLAG_FRAMEREL                    = 00000020h
SYMFLAG_FUNCTION                    = 00000800h
SYMFLAG_LOCAL                       = 00000080h
SYMFLAG_PARAMETER                   = 00000040h
SYMFLAG_REGISTER                    = 00000008h
SYMFLAG_REGREL                      = 00000010h
SYMFLAG_THUNK                       = 00002000h
SYMFLAG_TLSREL                      = 00004000h
SYMFLAG_VALUEPRESENT                = 00000001h
SYMFLAG_VIRTUAL                     = 00001000h
SYMF_CONSTANT                       = 00000100h
SYMF_EXPORT                         = 00000200h
SYMF_FORWARDER                      = 00000400h
SYMF_FRAMEREL                       = 00000020h
SYMF_FUNCTION                       = 00000800h
SYMF_LOCAL                          = 00000080h
SYMF_OMAP_GENERATED                 = 000000001h
SYMF_OMAP_MODIFIED                  = 000000002h
SYMF_PARAMETER                      = 00000040h
SYMF_REGISTER                       = 00000008h
SYMF_REGREL                         = 00000010h
SYMF_THUNK                          = 00002000h
SYMF_TLSREL                         = 00004000h
SYMF_VIRTUAL                        = 00001000h
SYMOPT_ALLOW_ABSOLUTE_SYMBOLS       = 00000800h
SYMOPT_AUTO_PUBLICS                 = 00010000h
SYMOPT_CASE_INSENSITIVE             = 000000001h
SYMOPT_DEBUG                        = 80000000h
SYMOPT_DEFERRED_LOADS               = 000000004h
SYMOPT_EXACT_SYMBOLS                = 00000400h
SYMOPT_FAIL_CRITICAL_ERRORS         = 00000200h
SYMOPT_IGNORE_CVREC                 = 00000080h
SYMOPT_IGNORE_NT_SYMPATH            = 00001000h
SYMOPT_INCLUDE_32BIT_MODULES        = 00002000h
SYMOPT_LOAD_ANYTHING                = 00000040h
SYMOPT_LOAD_LINES                   = 000000010h
SYMOPT_NO_CPP                       = 000000008h
SYMOPT_NO_IMAGE_SEARCH              = 00020000h
SYMOPT_NO_PROMPTS                   = 00080000h
SYMOPT_NO_PUBLICS                   = 00008000h
SYMOPT_NO_UNQUALIFIED_LOADS         = 00000100h
SYMOPT_OMAP_FIND_NEAREST            = 000000020h
SYMOPT_PUBLICS_ONLY                 = 00004000h
SYMOPT_SECURE                       = 00040000h
SYMOPT_UNDNAME                      = 000000002h
SymCoff                             = 1
SymCv                               = 2
SymDeferred                         = 5
SymExport                           = 4
SymNone                             = 0
SymPdb                              = 3
SymSym                              = 6
UNDNAME_32_BIT_DECODE               = 00800h
UNDNAME_COMPLETE                    = 00000h
UNDNAME_NAME_ONLY                   = 01000h
UNDNAME_NO_ACCESS_SPECIFIERS        = 00080h
UNDNAME_NO_ALLOCATION_LANGUAGE      = 00010h
UNDNAME_NO_ALLOCATION_MODEL         = 00008h
UNDNAME_NO_ARGUMENTS                = 02000h
UNDNAME_NO_CV_THISTYPE              = 00040h
UNDNAME_NO_FUNCTION_RETURNS         = 00004h
UNDNAME_NO_LEADING_UNDERSCORES      = 00001h
UNDNAME_NO_MEMBER_TYPE              = 00200h
UNDNAME_NO_MS_KEYWORDS              = 00002h
UNDNAME_NO_MS_THISTYPE              = 00020h
UNDNAME_NO_RETURN_UDT_MODEL         = 00400h
UNDNAME_NO_SPECIAL_SYMS             = 04000h
UNDNAME_NO_THISTYPE                 = 00060h
UNDNAME_NO_THROW_SIGNATURES         = 00100h

; --------------------- Imagehlp.h STRUCTURES ---------------------

LOADED_IMAGE struct
    ModuleName                      DWORD   ?
    hFile                           DWORD   ?
    MappedAddress                   DWORD   ?
    FileHeader                      DWORD   ?
    LastRvaSection                  DWORD   ?
    NumberOfSections                DWORD   ?
    Sections                        DWORD   ?
    Characteristics                 DWORD   ?
    fSystemImage                    BYTE    ?
    fDOSImage                       BYTE    ?
    Links                           DWORD   ?
    SizeOfImage                     DWORD   ?
LOADED_IMAGE ends

IMAGE_DEBUG_INFORMATION struct
    List                            LIST_ENTRY <>
    Size1                           DWORD    ?
    MappedBase                      DWORD    ?
    Machine                         WORD     ?
    Characteristics                 WORD     ?
    CheckSum                        DWORD    ?
    ImageBase                       DWORD    ?
    SizeOfImage                     DWORD    ?
    NumberOfSections                DWORD    ?
    Sections                        DWORD    ?
    ExportedNamesSize               DWORD    ?
    ExportedNames                   DWORD    ?
    NumberOfFunctionTableEntries    DWORD    ?
    FunctionTableEntries            DWORD    ?
    LowestFunctionStartingAddress   DWORD    ?
    HighestFunctionEndingAddress    DWORD    ?
    NumberOfFpoTableEntries         DWORD    ?
    FpoTableEntries                 DWORD    ?
    SizeOfCoffSymbols               DWORD    ?
    CoffSymbols                     DWORD    ?
    SizeOfCodeViewSymbols           DWORD    ?
    CodeViewSymbols                 DWORD    ?
    ImageFilePath                   DWORD    ?
    ImageFileName                   DWORD    ?
    DebugFilePath                   DWORD    ?
    TimeDateStamp                   DWORD    ?
    RomImage                        BYTE     ?
    DebugDirectory                  DWORD    ?
    NumberOfDebugDirectories        DWORD    ?
    Reserved                        DWORD    3 dup (?)
IMAGE_DEBUG_INFORMATION ends

ADDRESS struct
    Offset1  DWORD      ?
    Segment1 WORD       ?
    Mode     DWORD ?
ADDRESS ends

KDHELP struct
    Thread                      DWORD    ?
    ThCallbackStack             DWORD    ?
    NextCallback                DWORD    ?
    FramePointer                DWORD    ?
    KiCallUserMode              DWORD    ?
    KeUserCallbackDispatcher    DWORD    ?
    SystemRangeStart            DWORD    ?
KDHELP ends

STACKFRAME struct
    AddrPC          ADDRESS <>
    AddrReturn      ADDRESS <>
    AddrFrame       ADDRESS <>
    AddrStack       ADDRESS <>
    FuncTableEntry  DWORD ?
    Params          DWORD 4 dup (?)
    Far1            BOOL ?
    Virtual         BOOL ?
    Reserved        DWORD 3 dup (?)
    KdHelp          KDHELP <>
STACKFRAME ends

API_VERSION struct
    MajorVersion    WORD     ?
    MinorVersion    WORD     ?
    Revision        WORD     ?
    Reserved        WORD     ?
API_VERSION ends

IMAGEHLP_SYMBOL struct
    SizeOfStruct    DWORD   ?
    Address         DWORD   ?
    Size1           DWORD   ?
    Flags           DWORD   ?
    MaxNameLength   DWORD   ?
    Name           db      ?
IMAGEHLP_SYMBOL ends

IMAGEHLP_MODULE struct
    SizeOfStruct    DWORD   ?
    BaseOfImage     DWORD   ?
    ImageSize       DWORD   ?
    TimeDateStamp   DWORD   ?
    CheckSum        DWORD   ?
    NumSyms         DWORD   ?
    SymType1        DWORD   ?
    ModuleName      BYTE  32 dup (?)
    ImageName       BYTE 256 dup (?)
    LoadedImageName BYTE 256 dup (?)
IMAGEHLP_MODULE ends

IMAGEHLP_LINE struct
    SizeOfStruct    DWORD    ?
    Key             DWORD    ?
    LineNumber      DWORD    ?
    FileName        DWORD    ?
    Address         DWORD    ?
IMAGEHLP_LINE ends

IMAGEHLP_DEFERRED_SYMBOL_LOAD struct
    SizeOfStruct    DWORD    ?
    BaseOfImage     DWORD    ?
    CheckSum        DWORD    ?
    TimeDateStamp   DWORD    ?
    FileName        BYTE MAX_PATH dup (?)
    Reparse         BYTE     ?
IMAGEHLP_DEFERRED_SYMBOL_LOAD ends

IMAGEHLP_DUPLICATE_SYMBOL struct
    SizeOfStruct    DWORD   ?
    NumberOfDups    DWORD   ?
    Symbol          DWORD   ?
    SelectedSymbol  DWORD   ?
IMAGEHLP_DUPLICATE_SYMBOL ends

;;;; end imaghlp

;;;; excpt

;--------------------------------------[ Excpt.h ]--------------------------

ExceptionContinueExecution              = 0
ExceptionContinueSearch                 = 1
ExceptionNestedException                = 2
ExceptionCollidedUnwind                 = 3

;;;; end excpt

;;;; wtypes

;-------------------------------------[ wtypes.h ]------------------------------
TYPEDEF IID, GUID
TYPEDEF CLSID, GUID
MEMCTX_TASK     = 1
MEMCTX_SHARED   = 2
MEMCTX_MACSYSTEM    = 3
MEMCTX_UNKNOWN  = -1
MEMCTX_SAME     = -2
ROTFLAGS_REGISTRATIONKEEPSALIVE = 1
ROTFLAGS_ALLOWANYCLIENT         = 2
ROT_COMPARE_MAX                 = 2048
CLSCTX_INPROC_SERVER        = 1
CLSCTX_INPROC_HANDLER       = 2
CLSCTX_LOCAL_SERVER     = 4
CLSCTX_INPROC_SERVER16      = 8
CLSCTX_REMOTE_SERVER        = 10h
CLSCTX_INPROC_HANDLER16     = 20h
CLSCTX_INPROC_SERVERX86     = 40h
CLSCTX_INPROC_HANDLERX86    = 80h
CLSCTX_ESERVER_HANDLER      = 100h
MSHLFLAGS_NORMAL        = 0
MSHLFLAGS_TABLESTRONG   = 1
MSHLFLAGS_TABLEWEAK = 2
MSHLFLAGS_NOPING        = 4
MSHCTX_LOCAL        = 0
MSHCTX_NOSHAREDMEM  = 1
MSHCTX_DIFFERENTMACHINE = 2
MSHCTX_INPROC       = 3
DVASPECT_CONTENT        = 1
DVASPECT_THUMBNAIL  = 2
DVASPECT_ICON       = 4
DVASPECT_DOCPRINT       = 8
STGC_DEFAULT        = 0
STGC_OVERWRITE      = 1
STGC_ONLYIFCURRENT  = 2
STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE = 4
STGC_CONSOLIDATE        = 8
STGMOVE_MOVE        = 0
STGMOVE_COPY        = 1
STGMOVE_SHALLOWCOPY = 2
STATFLAG_DEFAULT        = 0
STATFLAG_NONAME     = 1
STATFLAG_NOOPEN     = 2
WDT_INPROC_CALL     = 48746457h
WDT_REMOTE_CALL     = 52746457h
VARIANT_TRUE        = 0ffffh
VARIANT_FALSE       = 0
DECIMAL_NEG         = 80
APPINFO_PUBLISHED   = 1
APPINFO_SHELLNEW    = APPINFO_PUBLISHED + 1
APPINFO_INSERTABLE  = APPINFO_SHELLNEW + 1
ACTFLG_RunLocally   = 1
ACTFLG_RunOnce      = 2
ACTFLG_SystemWide   = 4
ACTFLG_Published    = 8
ACTFLG_Assigned     = 16
ACTFLG_UserInstall  = 32
ExeNamePath         = 0
DllNamePath         = ExeNamePath + 1
TlbNamePath         = DllNamePath + 1
CabFilePath         = TlbNamePath + 1
InfFilePath         = CabFilePath + 1
DrwFilePath         = InfFilePath + 1
SetupNamePath       = DrwFilePath + 1
TYSPEC_CLSID        = 0
TYSPEC_FILEEXT      = TYSPEC_CLSID + 1
TYSPEC_MIMETYPE     = TYSPEC_FILEEXT + 1
TYSPEC_PROGID       = TYSPEC_MIMETYPE + 1
TYSPEC_IID          = TYSPEC_PROGID + 1
TYSPEC_TYPELIB      = TYSPEC_IID + 1
TYSPEC_FILENAME     = TYSPEC_TYPELIB + 1
TYSPEC_JAVACLASS    = TYSPEC_FILENAME + 1
TYSPEC_PACKAGENAME  = TYSPEC_JAVACLASS + 1
VT_EMPTY            = 0
VT_NULL             = 1
VT_I2               = 2
VT_I4               = 3
VT_R4               = 4
VT_R8               = 5
VT_CY               = 6
VT_DATE             = 7
VT_BSTR             = 8
VT_DISPATCH         = 9
VT_ERROR            = 10
VT_BOOL             = 11
VT_VARIANT          = 12
VT_UNKNOWN          = 13
VT_DECIMAL          = 14
VT_I1               = 16
VT_UI1              = 17
VT_UI2              = 18
VT_UI4              = 19
VT_I8               = 20
VT_UI8              = 21
VT_INT              = 22
VT_UINT             = 23
VT_VOID             = 24
VT_HRESULT          = 25
VT_PTR              = 26
VT_SAFEARRAY        = 27
VT_CARRAY           = 28
VT_USERDEFINED      = 29
VT_LPSTR            = 30
VT_LPWSTR           = 31
VT_RECORD           = 36
VT_FILETIME         = 64
VT_BLOB             = 65
VT_STREAM           = 66
VT_STORAGE          = 67
VT_STREAMED_OBJECT  = 68
VT_STORED_OBJECT    = 69
VT_BLOB_OBJECT      = 70
VT_CF               = 71
VT_CLSID            = 72
VT_BSTR_BLOB        = 0fffh
VT_VECTOR           = 1000h
VT_ARRAY            = 2000h
VT_BYREF            = 4000h
VT_RESERVED         = 8000h
VT_ILLEGAL          = 0ffffh
VT_ILLEGALMASKED    = 0fffh
VT_TYPEMASK         = 0fffh

RemHGLOBAL struct
    fNullHGlobal DWORD  ?
    cbData DWORD        ?
    data db             ?
RemHGLOBAL ends

RemHMETAFILEPICT struct
    imm DWORD       ?
    xExt DWORD      ?
    yExt DWORD      ?
    cbData DWORD    ?
    data db         ?
RemHMETAFILEPICT ends

RemHENHMETAFILE struct
    cbData DWORD    ?
    data db         ?
RemHENHMETAFILE ends

RemHBITMAP struct
    cbData DWORD    ?
    data db         ?
RemHBITMAP ends

RemHPALETTE struct
    cbData DWORD    ?
    data db         ?
RemHPALETTE ends

RemHBRUSH struct
    cbData DWORD    ?
    data db         ?
RemHBRUSH ends

COAUTHIDENTITY struct
    User DWORD              ?
    UserLength DWORD        ?
    Domain DWORD            ?
    DomainLength DWORD      ?
    Password DWORD          ?
    PasswordLength DWORD    ?
    Flags DWORD             ?
COAUTHIDENTITY ends

COAUTHINFO struct
    dwAuthnSvc DWORD            ?
    dwAuthzSvc DWORD            ?
    pwszServerPrincName DWORD   ?
    dwAuthnLevel DWORD          ?
    dwImpersonationLevel DWORD  ?
    pAuthIdentityData DWORD     ?
    dwCapabilities DWORD        ?
COAUTHINFO ends

BYTE_BLOB struct
    clSize DWORD    ?
    abData db       ?
BYTE_BLOB ends

WORD_BLOB struct
    clSize DWORD    ?
    asData dw       ?
WORD_BLOB ends

DWORD_BLOB struct
    clSize DWORD    ?
    alData DWORD    ?
DWORD_BLOB ends

FLAGGED_BYTE_BLOB struct
    fFlags DWORD    ?
    clSize DWORD    ?
    abData db       ?
FLAGGED_BYTE_BLOB ends

FLAGGED_WORD_BLOB struct
    fFlags DWORD ?
    clSize DWORD ?
    asData dw ?
FLAGGED_WORD_BLOB ends

BYTE_SIZEDARR struct
    clSize DWORD    ?
    pData DWORD     ?
BYTE_SIZEDARR ends

WORD_SIZEDARR struct
    clSize DWORD    ?
    pData DWORD     ?
WORD_SIZEDARR ends

DWORD_SIZEDARR struct
    clSize DWORD        ?
    pData DWORD         ?
DWORD_SIZEDARR ends

HYPER_SIZEDARR struct
    clSize DWORD        ?
    pData DWORD         ?
HYPER_SIZEDARR ends

userCLIPFORMAT struct
    fContext DWORD      ?
    union ;u
        dwValue DWORD   ?
        pwszName DWORD  ?
    ends
userCLIPFORMAT ends

GDI_NONREMOTE struct
    fContext DWORD      ?
    union ;u
        hInproc DWORD   ?
        hRemote DWORD   ?
    ends
GDI_NONREMOTE ends

userHGLOBAL struct
    fContext DWORD      ?
    union ;u
        hInproc DWORD   ?
        hRemote DWORD   ?
        hGlobal DWORD   ?
    ends
userHGLOBAL ends

userHMETAFILE struct
    fContext DWORD      ?
    union ;u
        hInproc DWORD   ?
        hRemote DWORD   ?
        hGlobal DWORD   ?
    ends
userHMETAFILE ends

remoteMETAFILEPICT struct
    imm DWORD   ?
    xExt DWORD  ?
    yExt DWORD  ?
    hMF DWORD   ?
remoteMETAFILEPICT ends

userHMETAFILEPICT struct
    fContext DWORD      ?
    union ;u
        hInproc DWORD   ?
        hRemote DWORD   ?
        hGlobal DWORD   ?
    ends
userHMETAFILEPICT ends

userHENHMETAFILE struct
    fContext DWORD      ?
    union ;u
        hInproc DWORD   ?
        hRemote DWORD   ?
        hGlobal DWORD   ?
    ends
userHENHMETAFILE ends

userBITMAP struct
    bmType DWORD        ?
    bmWidth DWORD       ?
    bmHeight DWORD      ?
    bmWidthBytes DWORD  ?
    bmPlanes dw         ?
    bmBitsPixel dw      ?
    cbSize DWORD        ?
    pBuffer db          ?
userBITMAP ends

userHBITMAP struct
    fContext DWORD ?
    union ;u
        hInproc dd ?
        hRemote dd ?
        hGlobal dd ?
    ends
userHBITMAP ends

rpcLOGPALETTE struct
    palVersion dw       ?
    palNumEntries dw    ?
    palPalEntry PALETTEENTRY <>
rpcLOGPALETTE ends

userHPALETTE struct
    fContext dd ?
    union ;u
        hInproc dd ?
        hRemote dd ?
        hGlobal dd ?
    ends
userHPALETTE ends

RemotableHandle struct
    fContext dd ?
    union ;u
        hInproc dd ?
        hRemote dd ?
    ends
RemotableHandle ends

BSTRBLOB struct
    cbSize dd   ?
    pData dd    ?
BSTRBLOB ends

BLOB struct
    cbSize dd       ?
    pBlobData dd    ?
BLOB ends

CLIPDATA struct
    cbSize dd       ?
    ulClipFmt dd    ?
    pClipData dd    ?
CLIPDATA ends

CSPLATFORM struct
    dwPlatformId dd     ?
    dwVersionHi dd      ?
    dwVersionLo dd      ?
    dwProcessorArch dd  ?
CSPLATFORM ends

QUERYCONTEXT struct
    dwContext dd    ?
    Platform CSPLATFORM <>
    Locale dd       ?
    dwVersionHi dd  ?
    dwVersionLo dd  ?
QUERYCONTEXT ends

uCLSSPEC struct
    tyspec dd ?
    union ;tagged_union
        clsid CLSID         <>
        iid IID             <>
        typelibID GUID      <>
        pFileExt dd         ?
        pMimeType dd        ?
        pProgId dd          ?
        pFileName dd        ?
        pJavaClassName dd   ?
        pPackageName dd     ?
    ends
uCLSSPEC ends

PUBLISHEDAPPINFO struct
    pwszFileExtension dd    ?
    pwszDisplayName dd      ?
    pwszPackagePath dd      ?
PUBLISHEDAPPINFO ends

APPDETAIL struct
    AppID GUID          <>
    cClasses dd         ?
    prgClsIdList dd     ?
    cTypeLibIds dd      ?
    prgTypeLibIdList dd ?
    cServers dd         ?
    prgServerNames dd   ?
APPDETAIL ends

;;;; end wtypes

;;;; mmsys

;-------------------------------------------[ mmsystem.h ]--------------------------------

MM_DRVM_OPEN        = 3D0h
MM_DRVM_CLOSE       = 3D1h
MM_DRVM_DATA        = 3D2h
MM_DRVM_ERROR       = 3D3h
MM_STREAM_OPEN      = 3D4h
MM_STREAM_CLOSE     = 3D5h
MM_STREAM_DONE      = 3D6h
MM_STREAM_ERROR     = 3D7h
MM_MIXM_LINE_CHANGE     = 3D0h
MM_MIXM_CONTROL_CHANGE  = 3D1h
MMSYSERR_BADDB      = (MMSYSERR_BASE + 14)
MMSYSERR_KEYNOTFOUND    = (MMSYSERR_BASE + 15)
MMSYSERR_READERROR  = (MMSYSERR_BASE + 16)
MMSYSERR_WRITEERROR     = (MMSYSERR_BASE + 17)
MMSYSERR_DELETEERROR    = (MMSYSERR_BASE + 18)
MMSYSERR_VALNOTFOUND    = (MMSYSERR_BASE + 19)
MMSYSERR_NODRIVERCB     = (MMSYSERR_BASE + 20)
CALLBACK_THREAD         = (CALLBACK_TASK)
CALLBACK_EVENT      = 50000h
WAVECAPS_SAMPLEACCURATE = 20h
WAVECAPS_DIRECTSOUND    = 40h
MIDIERR_BADOPENMODE     = (MIDIERR_BASE + 6)
MIDIERR_DONT_CONTINUE   = (MIDIERR_BASE + 7)
MIDIPATCHSIZE       = 128
MEVT_SHORTMSG       = 0
MEVT_TEMPO          = 1
MEVT_NOP            = 2
MEVT_LONGMSG        = 80h
MEVT_COMMENT        = 82h
MEVT_VERSION        = 84h
MMIOERR_PATHNOTFOUND    = (MMIOERR_BASE + 11)
MMIOERR_ACCESSDENIED    = (MMIOERR_BASE + 12)
MMIOERR_SHARINGVIOLATION = (MMIOERR_BASE + 13)
MMIOERR_NETWORKERROR    = (MMIOERR_BASE + 14)
MMIOERR_TOOMANYOPENFILES = (MMIOERR_BASE + 15)
MMIOERR_INVALIDFILE     = (MMIOERR_BASE + 16)
CFSEPCHAR           = '+'
MCIERR_NO_IDENTITY  = (MCIERR_BASE + 94)
MCI_INFO_MEDIA_UPC  = 400h
MCI_INFO_MEDIA_IDENTITY = 800h
MCI_INFO_NAME       = 1000h
MCI_INFO_COPYRIGHT  = 2000h
MCI_CDA_STATUS_TYPE_TRACK = 4001h
MCI_CDA_TRACK_AUDIO     = (MCI_CD_OFFSET + 0)
MCI_CDA_TRACK_OTHER     = (MCI_CD_OFFSET + 1)
MCI_SEQ_STATUS_NAME     = 400Bh
MCI_SEQ_STATUS_COPYRIGHT = 400Ch

MIXERLINE struct            ;DWORD
    cbStruct                DWORD       ?
    dwDestination           DWORD       ?
    dwSource                DWORD       ?
    dwLineID                DWORD       ?
    fdwLine                 DWORD       ?
    dwUser                  DWORD       ?
    dwComponentType         DWORD       ?
    cChannels               DWORD       ?
    cConnections            DWORD       ?
    cControls               DWORD       ?
    szShortName             TCHAR    MIXER_SHORT_NAME_CHARS dup(?)
    szName                  TCHAR    MIXER_LONG_NAME_CHARS dup(?)
    struct ;Target
        dwType dd ?
        dwDeviceID dd ?
        wMid dw ?
        wPid dw ?
        vDriverVersion MMVERSION ?
        szPname TCHAR MAXPNAMELEN dup(?)
    ends
MIXERLINE ends

MIXERCONTROL struct ;DWORD
    cbStruct        DWORD ?
    dwControlID     DWORD ?
    dwControlType   DWORD ?
    fdwControl      DWORD ?
    cMultipleItems  DWORD ?
    szShortName     TCHAR MIXER_SHORT_NAME_CHARS dup(?)
    szName          TCHAR MIXER_LONG_NAME_CHARS dup(?)
    union ;Bounds
        struct
            lMinimum dd ?
            lMaximum dd ?
        ends
        struct
            dwMinimum dd ?
            dwMaximum dd ?
        ends
        Bounds.dwReserved dd 6 dup(?)
    ends
    union ;Metrics
        cSteps dd ?
        cbCustomData dd ?
        Metrics.dwReserved dd 6 dup(?)
    ends
MIXERCONTROL ends

WAVEFORMATEX struct
    wFormatTag dw ?
    nChannels dw ?
    nSamplesPerSec dd ?
    nAvgBytesPerSec dd ?
    nBlockAlign dw ?
    wBitsPerSample dw ?
    cbSize dw ?
WAVEFORMATEX ends

MIXERCONTROLDETAILS_LISTTEXT struct
    dwParam1 dd ?
    dwParam2 dd ?
    szName TCHAR MIXER_LONG_NAME_CHARS dup(?)
MIXERCONTROLDETAILS_LISTTEXT ends

; -------------------------------------------------
; Thew following equates were contributed by "bart"
; -------------------------------------------------
SND_ALIAS_SYSTEMASTERISK        = 00002A53h
SND_ALIAS_SYSTEMQUESTION        = 00003F53h
SND_ALIAS_SYSTEMHAND            = 00004853h
SND_ALIAS_SYSTEMEXIT            = 00004553h
SND_ALIAS_SYSTEMSTART           = 00005353h
SND_ALIAS_SYSTEMWELCOME         = 00005753h
SND_ALIAS_SYSTEMEXCLAMATION     = 00002153h
SND_ALIAS_SYSTEMDEFAULT         = 00004453h


WAVE_FORMAT_44M08                = 00000100h
WAVE_FORMAT_44S08                = 00000200h
WAVE_FORMAT_44M16                = 00000400h
WAVE_FORMAT_44S16                = 00000800h
WAVE_FORMAT_48M08                = 00001000h
WAVE_FORMAT_48S08                = 00002000h
WAVE_FORMAT_48M16                = 00004000h
WAVE_FORMAT_48S16                = 00008000h
WAVE_FORMAT_96M08                = 00010000h
WAVE_FORMAT_96S08                = 00020000h
WAVE_FORMAT_96M16                = 00040000h
WAVE_FORMAT_96S16                = 00080000h
MOD_WAVETABLE                    = 6
MOD_SWSYNTH                      = 7
TIME_CALLBACK_FUNCTION           = 0000h
TIME_CALLBACK_EVENT_SET          = 0010h
TIME_CALLBACK_EVENT_PULSE        = 0020h
TIME_KILL_SYNCHRONOUS            = 0100h
JOYCAPS_HASZ                     = 0001h
JOYCAPS_HASR                     = 0002h
JOYCAPS_HASU                     = 0004h
JOYCAPS_HASV                     = 0008h
JOYCAPS_HASPOV                   = 0010h
JOYCAPS_POV4DIR                  = 0020h
JOYCAPS_POVCTS                   = 0040h

;;;; end mmsys

;;;; cpl

;----------------------------------------[ cpl.h ]--------------------------------

WM_CPL_LAUNCH   = WM_USER+1000
WM_CPL_LAUNCHED = WM_USER+1001
CPL_DYNAMIC_RES = 0
CPL_INIT = 1
CPL_GETCOUNT = 2
CPL_INQUIRE = 3
CPL_SELECT = 4
CPL_DBLCLK = 5
CPL_STOP = 6
CPL_EXIT = 7
CPL_NEWINQUIRE   = 8
CPL_STARTWPARMSA = 9
CPL_STARTWPARMSW = 10
if UNICODE eq TRUE
    CPL_STARTWPARMS = CPL_STARTWPARMSW
else
    CPL_STARTWPARMS = CPL_STARTWPARMSA
end if

CPL_SETUP = 200

CPLINFO struct
    idIcon dd ?
    idName dd ?
    idInfo dd ?
    lData dd ?
CPLINFO ends

NEWCPLINFO struct
    dwSize dd ?
    dwFlags dd ?
    dwHelpContext dd ?
    lData dd ?
    hIcon dd ?
    szName TCHAR 32 dup(?)
    szInfo TCHAR 64 dup(?)
    szHelpFile TCHAR 128 dup(?)
NEWCPLINFO ends

;--------------------------------------[ cplext.h ]----------------------------------
CPLPAGE_MOUSE_BUTTONS = 1
CPLPAGE_MOUSE_PTRMOTION = 2
CPLPAGE_KEYBOARD_SPEED = 1

;;;; end cpl

;;;; ctl3d

;--------------------------------------[ ctl3d.h ]------------------------------------

CTL3D_SUBCLASS_DYNCREATE = 1
CTL3D_NOSUBCLASS_DYNCREATE = 2
CTL3D_BUTTON_CTL        = 0
CTL3D_LISTBOX_CTL       = 1
CTL3D_EDIT_CTL          = 2
CTL3D_COMBO_CTL         = 3
CTL3D_STATIC_CTL        = 4
CTL3D_BUTTONS           = 1
CTL3D_LISTBOXES         = 2
CTL3D_EDITS             = 4
CTL3D_COMBOS            = 8
CTL3D_STATICTEXTS       = 10h
CTL3D_STATICFRAMES      = 20h
CTL3D_NODLGWINDOW       = 10000h
CTL3D_ALL               = 0ffffh
WM_DLGBORDER            = WM_USER+3567
CTL3D_NOBORDER          = 0
CTL3D_BORDER            = 1
WM_DLGSUBCLASS          = WM_USER+3568
CTL3D_NOSUBCLASS        = 0
CTL3D_SUBCLASS          = 1
CTLMSGOFFSET            = 3569
CTL3D_CTLCOLORMSGBOX    = WM_USER+CTLMSGOFFSET
CTL3D_CTLCOLOREDIT      = WM_USER+CTLMSGOFFSET+1
CTL3D_CTLCOLORLISTBOX   = WM_USER+CTLMSGOFFSET+2
CTL3D_CTLCOLORBTN       = WM_USER+CTLMSGOFFSET+3
CTL3D_CTLCOLORSCROLLBAR = WM_USER+CTLMSGOFFSET+4
CTL3D_CTLCOLORSTATIC    = WM_USER+CTLMSGOFFSET+5
CTL3D_CTLCOLORDLG       = WM_USER+CTLMSGOFFSET+6
CTL3D_3DCHECK           = 26567

;;;; end ctl3d

;;;; shlapi

; ---------------------------- ShellAPI.h -------------------------------

FOF_NOERRORUI           = 400h
FOF_NOCOPYSECURITYATTRIBS = 800h
SEE_MASK_UNICODE        = 4000h
SEE_MASK_NO_CONSOLE     = 8000h
SEE_MASK_ASYNCOK        = 100000h
SEE_MASK_HMONITOR       = 200000h
SEE_MASK_DEFAULT        = 0x00000000
SEE_MASK_NOASYNC        = 0x00000100
SEE_MASK_NOQUERYCLASSSTORE  = 0x01000000
SEE_MASK_NOZONECHECKS   = 0x00800000
SEE_MASK_WAITFORINPUTIDLE   = 0x02000000
SEE_MASK_FLAG_LOG_USAGE = 0x04000000
SEE_MASK_FLAG_HINST_IS_SITE = 0x08000000
SHERB_NOCONFIRMATION    = 1
SHERB_NOPROGRESSUI      = 2
SHERB_NOSOUND           = 4
SHGFI_ATTR_SPECIFIED    = 20000h
SHGNLI_NOUNIQUE         = 4
PRINTACTION_OPEN        = 0
PRINTACTION_PROPERTIES          = 1
PRINTACTION_NETINSTALL          = 2
PRINTACTION_NETINSTALLLINK      = 3
PRINTACTION_TESTPAGE            = 4
PRINTACTION_OPENNETPRN          = 5
PRINTACTION_DOCUMENTDEFAULTS    = 6
PRINTACTION_SERVERPROPERTIES    = 7

SHQUERYRBINFO struct
 cbSize         dd ?
 i64Size        QWORD ?
 i64NumItems    QWORD ?
SHQUERYRBINFO ends

;wininet.h

INTERNET_INVALID_PORT_NUMBER            = 0
INTERNET_DEFAULT_FTP_PORT               = 21
INTERNET_DEFAULT_GOPHER_PORT            = 70
INTERNET_DEFAULT_HTTP_PORT              = 80
INTERNET_DEFAULT_HTTPS_PORT             = 443
INTERNET_DEFAULT_SOCKS_PORT             = 1080
INTERNET_MAX_HOST_NAME_LENGTH           = 256
INTERNET_MAX_USER_NAME_LENGTH           = 128
INTERNET_MAX_PASSWORD_LENGTH            = 128
INTERNET_MAX_PORT_NUMBER_LENGTH         = 5
INTERNET_MAX_PORT_NUMBER_VALUE          = 65535
INTERNET_MAX_PATH_LENGTH                = 2048
INTERNET_MAX_SCHEME_LENGTH              = 32
INTERNET_MAX_URL_LENGTH                 = INTERNET_MAX_SCHEME_LENGTH + 3 + INTERNET_MAX_PATH_LENGTH
INTERNET_KEEP_ALIVE_UNKNOWN             = 0ffffffffh
INTERNET_KEEP_ALIVE_ENABLED             = 1
INTERNET_KEEP_ALIVE_DISABLED            = 0
INTERNET_REQFLAG_FROM_CACHE             = 1
INTERNET_REQFLAG_ASYNC                  = 2
INTERNET_REQFLAG_VIA_PROXY              = 4
INTERNET_REQFLAG_NO_HEADERS             = 8
INTERNET_REQFLAG_PASSIVE                = 10h
INTERNET_REQFLAG_CACHE_WRITE_DISABLED   = 40h
INTERNET_FLAG_RELOAD                    = 80000000h
INTERNET_FLAG_RAW_DATA                  = 40000000h
INTERNET_FLAG_EXISTING_CONNECT          = 20000000h
INTERNET_FLAG_ASYNC                     = 10000000h
INTERNET_FLAG_PASSIVE                   = 8000000h
INTERNET_FLAG_NO_CACHE_WRITE            = 4000000h
INTERNET_FLAG_DONT_CACHE = INTERNET_FLAG_NO_CACHE_WRITE
INTERNET_FLAG_MAKE_PERSISTENT           = 2000000h
INTERNET_FLAG_FROM_CACHE                = 1000000h
INTERNET_FLAG_OFFLINE                   = INTERNET_FLAG_FROM_CACHE
INTERNET_FLAG_SECURE                    = 800000h
INTERNET_FLAG_KEEP_CONNECTION           = 400000h
INTERNET_FLAG_NO_AUTO_REDIRECT          = 200000h
INTERNET_FLAG_READ_PREFETCH             = 100000h
INTERNET_FLAG_NO_COOKIES                = 80000h
INTERNET_FLAG_NO_AUTH                   = 40000h
INTERNET_FLAG_CACHE_IF_NET_FAIL         = 10000h
INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP   = 8000h
INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS  = 4000h
INTERNET_FLAG_IGNORE_CERT_DATE_INVALID  = 2000h
INTERNET_FLAG_IGNORE_CERT_CN_INVALID    = 1000h
INTERNET_FLAG_RESYNCHRONIZE             = 800h
INTERNET_FLAG_HYPERLINK                 = 400h
INTERNET_FLAG_NO_UI                     = 200h
INTERNET_FLAG_PRAGMA_NOCACHE            = 100h
INTERNET_FLAG_CACHE_ASYNC               = 80h
INTERNET_FLAG_FORMS_SUBMIT              = 40h
INTERNET_FLAG_NEED_FILE                 = 10h
INTERNET_FLAG_MUST_CACHE_REQUEST    = INTERNET_FLAG_NEED_FILE
INTERNET_FLAG_TRANSFER_ASCII        = FTP_TRANSFER_TYPE_ASCII
INTERNET_FLAG_TRANSFER_BINARY       = FTP_TRANSFER_TYPE_BINARY
INTERNET_FLAGS_MASK = \
    INTERNET_FLAG_RELOAD or \
    INTERNET_FLAG_RAW_DATA or \
    INTERNET_FLAG_EXISTING_CONNECT or \
    INTERNET_FLAG_ASYNC or \
    INTERNET_FLAG_PASSIVE or \
    INTERNET_FLAG_NO_CACHE_WRITE or \
    INTERNET_FLAG_DONT_CACHE or \
    INTERNET_FLAG_MAKE_PERSISTENT or \
    INTERNET_FLAG_FROM_CACHE or \
    INTERNET_FLAG_OFFLINE or \
    INTERNET_FLAG_SECURE or \
    INTERNET_FLAG_KEEP_CONNECTION or \
    INTERNET_FLAG_NO_AUTO_REDIRECT or \
    INTERNET_FLAG_READ_PREFETCH or \
    INTERNET_FLAG_NO_COOKIES or \
    INTERNET_FLAG_NO_AUTH or \
    INTERNET_FLAG_CACHE_IF_NET_FAIL or \
    INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP or \
    INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS or \
    INTERNET_FLAG_IGNORE_CERT_DATE_INVALID or \
    INTERNET_FLAG_IGNORE_CERT_CN_INVALID or \
    INTERNET_FLAG_RESYNCHRONIZE or \
    INTERNET_FLAG_HYPERLINK or \
    INTERNET_FLAG_NO_UI or \
    INTERNET_FLAG_PRAGMA_NOCACHE or \
    INTERNET_FLAG_CACHE_ASYNC or \
    INTERNET_FLAG_FORMS_SUBMIT or \
    INTERNET_FLAG_NEED_FILE or \
    INTERNET_FLAG_MUST_CACHE_REQUEST or \
    INTERNET_FLAG_TRANSFER_ASCII or \
    INTERNET_FLAG_TRANSFER_BINARY
SECURITY_INTERNET_MASK              = INTERNET_FLAG_IGNORE_CERT_CN_INVALID + INTERNET_FLAG_IGNORE_CERT_DATE_INVALID + INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS + INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP
INTERNET_ERROR_MASK_INSERT_CDROM    = 1
INTERNET_OPTIONS_MASK               = not INTERNET_FLAGS_MASK
WININET_API_FLAG_ASYNC = 1
WININET_API_FLAG_SYNC = 4
WININET_API_FLAG_USE_CONTEXT    = 8
INTERNET_NO_CALLBACK            = 0
INTERNET_RFC1123_FORMAT         = 0
INTERNET_RFC1123_BUFSIZE        = 30
ICU_ESCAPE      = 80000000h
ICU_USERNAME    = 40000000h
ICU_NO_ENCODE   = 20000000h
ICU_DECODE      = 10000000h
ICU_NO_META     = 8000000h
ICU_ENCODE_SPACES_ONLY      = 4000000h
ICU_BROWSER_MODE            = 2000000h
INTERNET_OPEN_TYPE_PRECONFIG = 0
INTERNET_OPEN_TYPE_DIRECT   = 1
INTERNET_OPEN_TYPE_PROXY    = 3
INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY = 4
PRE_CONFIG_INTERNET_ACCESS  = INTERNET_OPEN_TYPE_PRECONFIG
LOCAL_INTERNET_ACCESS       = INTERNET_OPEN_TYPE_DIRECT
CERN_PROXY_INTERNET_ACCESS  = INTERNET_OPEN_TYPE_PROXY
INTERNET_SERVICE_URL    = 0
INTERNET_SERVICE_FTP    = 1
INTERNET_SERVICE_GOPHER = 2
INTERNET_SERVICE_HTTP   = 3
IRF_ASYNC               = WININET_API_FLAG_ASYNC
IRF_SYNC                = WININET_API_FLAG_SYNC
IRF_USE_CONTEXT         = WININET_API_FLAG_USE_CONTEXT
IRF_NO_WAIT             = 8
ISO_GLOBAL              = 1
ISO_REGISTRY            = 2
ISO_VALID_FLAGS                         = (ISO_GLOBAL + ISO_REGISTRY)
INTERNET_OPTION_CALLBACK                = 1
INTERNET_OPTION_CONNECT_TIMEOUT         = 2
INTERNET_OPTION_CONNECT_RETRIES         = 3
INTERNET_OPTION_CONNECT_BACKOFF         = 4
INTERNET_OPTION_SEND_TIMEOUT            = 5
INTERNET_OPTION_CONTROL_SEND_TIMEOUT    = INTERNET_OPTION_SEND_TIMEOUT
INTERNET_OPTION_RECEIVE_TIMEOUT         = 6
INTERNET_OPTION_CONTROL_RECEIVE_TIMEOUT = INTERNET_OPTION_RECEIVE_TIMEOUT
INTERNET_OPTION_DATA_SEND_TIMEOUT       = 7
INTERNET_OPTION_DATA_RECEIVE_TIMEOUT    = 8
INTERNET_OPTION_HANDLE_TYPE             = 9
INTERNET_OPTION_LISTEN_TIMEOUT          = 11
INTERNET_OPTION_READ_BUFFER_SIZE        = 12
INTERNET_OPTION_WRITE_BUFFER_SIZE       = 13
INTERNET_OPTION_ASYNC_ID                = 15
INTERNET_OPTION_ASYNC_PRIORITY          = 16
INTERNET_OPTION_PARENT_HANDLE           = 21
INTERNET_OPTION_KEEP_CONNECTION         = 22
INTERNET_OPTION_REQUEST_FLAGS           = 23
INTERNET_OPTION_EXTENDED_ERROR          = 24
INTERNET_OPTION_OFFLINE_MODE            = 26
INTERNET_OPTION_CACHE_STREAM_HANDLE     = 27
INTERNET_OPTION_USERNAME                = 28
INTERNET_OPTION_PASSWORD                = 29
INTERNET_OPTION_ASYNC                   = 30
INTERNET_OPTION_SECURITY_FLAGS          = 31
INTERNET_OPTION_SECURITY_CERTIFICATE_struct = 32
INTERNET_OPTION_DATAFILE_NAME           = 33
INTERNET_OPTION_URL                     = 34
INTERNET_OPTION_SECURITY_CERTIFICATE    = 35
INTERNET_OPTION_SECURITY_KEY_BITNESS    = 36
INTERNET_OPTION_REFRESH                 = 37
INTERNET_OPTION_PROXY                   = 38
INTERNET_OPTION_SETTINGS_CHANGED        = 39
INTERNET_OPTION_VERSION                 = 40
INTERNET_OPTION_USER_AGENT              = 41
INTERNET_OPTION_END_BROWSER_SESSION     = 42
INTERNET_OPTION_PROXY_USERNAME          = 43
INTERNET_OPTION_PROXY_PASSWORD          = 44
INTERNET_OPTION_CONTEXT_VALUE           = 45
INTERNET_OPTION_CONNECT_LIMIT           = 46
INTERNET_OPTION_SECURITY_SELECT_CLIENT_CERT = 47
INTERNET_OPTION_POLICY                  = 48
INTERNET_OPTION_DISCONNECTED_TIMEOUT    = 49
INTERNET_OPTION_CONNECTED_STATE         = 50
INTERNET_OPTION_IDLE_STATE              = 51
INTERNET_OPTION_OFFLINE_SEMANTICS       = 52
INTERNET_OPTION_SECONDARY_CACHE_KEY     = 53
INTERNET_OPTION_CALLBACK_FILTER         = 54
INTERNET_OPTION_CONNECT_TIME            = 55
INTERNET_OPTION_SEND_THROUGHPUT         = 56
INTERNET_OPTION_RECEIVE_THROUGHPUT      = 57
INTERNET_OPTION_REQUEST_PRIORITY        = 58
INTERNET_OPTION_HTTP_VERSION            = 59
INTERNET_OPTION_RESET_URLCACHE_SESSION  = 60
INTERNET_OPTION_ERROR_MASK              = 62
INTERNET_FIRST_OPTION                   = INTERNET_OPTION_CALLBACK
INTERNET_LAST_OPTION                    = INTERNET_OPTION_ERROR_MASK
INTERNET_PRIORITY_FOREGROUND            = 1000
INTERNET_HANDLE_TYPE_INTERNET           = 1
INTERNET_HANDLE_TYPE_CONNECT_FTP        = 2
INTERNET_HANDLE_TYPE_CONNECT_GOPHER     = 3
INTERNET_HANDLE_TYPE_CONNECT_HTTP       = 4
INTERNET_HANDLE_TYPE_FTP_FIND           = 5
INTERNET_HANDLE_TYPE_FTP_FIND_HTML      = 6
INTERNET_HANDLE_TYPE_FTP_FILE           = 7
INTERNET_HANDLE_TYPE_FTP_FILE_HTML      = 8
INTERNET_HANDLE_TYPE_GOPHER_FIND        = 9
INTERNET_HANDLE_TYPE_GOPHER_FIND_HTML   = 10
INTERNET_HANDLE_TYPE_GOPHER_FILE        = 11
INTERNET_HANDLE_TYPE_GOPHER_FILE_HTML   = 12
INTERNET_HANDLE_TYPE_HTTP_REQUEST       = 13
SECURITY_FLAG_SECURE            = 1
SECURITY_FLAG_STRENGTH_WEAK     = 10000000h
SECURITY_FLAG_STRENGTH_MEDIUM   = 40000000h
SECURITY_FLAG_STRENGTH_STRONG   = 20000000h
SECURITY_FLAG_UNKNOWNBIT        = 80000000h
SECURITY_FLAG_NORMALBITNESS     = SECURITY_FLAG_STRENGTH_WEAK
SECURITY_FLAG_SSL       = 2
SECURITY_FLAG_SSL3      = 4
SECURITY_FLAG_PCT       = 8
SECURITY_FLAG_PCT4      = 10h
SECURITY_FLAG_IETFSSL4  = 20h
SECURITY_FLAG_40BIT     = SECURITY_FLAG_STRENGTH_WEAK
SECURITY_FLAG_128BIT    = SECURITY_FLAG_STRENGTH_STRONG
SECURITY_FLAG_56BIT     = SECURITY_FLAG_STRENGTH_MEDIUM
SECURITY_FLAG_IGNORE_REVOCATION         = 80h
SECURITY_FLAG_IGNORE_UNKNOWN_CA         = 100h
SECURITY_FLAG_IGNORE_WRONG_USAGE        = 200h
SECURITY_FLAG_IGNORE_CERT_CN_INVALID    = INTERNET_FLAG_IGNORE_CERT_CN_INVALID
SECURITY_FLAG_IGNORE_CERT_DATE_INVALID  = INTERNET_FLAG_IGNORE_CERT_DATE_INVALID
SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTPS  = INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTPS
SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTP   = INTERNET_FLAG_IGNORE_REDIRECT_TO_HTTP
SECURITY_SET_MASK = (SECURITY_FLAG_IGNORE_REVOCATION+SECURITY_FLAG_IGNORE_UNKNOWN_CA+SECURITY_FLAG_IGNORE_CERT_CN_INVALID+SECURITY_FLAG_IGNORE_CERT_DATE_INVALID+SECURITY_FLAG_IGNORE_WRONG_USAGE)
INTERNET_STATUS_RESOLVING_NAME          = 10
INTERNET_STATUS_NAME_RESOLVED           = 11
INTERNET_STATUS_CONNECTING_TO_SERVER    = 20
INTERNET_STATUS_CONNECTED_TO_SERVER     = 21
INTERNET_STATUS_SENDING_REQUEST         = 30
INTERNET_STATUS_REQUEST_SENT            = 31
INTERNET_STATUS_RECEIVING_RESPONSE      = 40
INTERNET_STATUS_RESPONSE_RECEIVED       = 41
INTERNET_STATUS_CTL_RESPONSE_RECEIVED   = 42
INTERNET_STATUS_PREFETCH                = 43
INTERNET_STATUS_CLOSING_CONNECTION      = 50
INTERNET_STATUS_CONNECTION_CLOSED       = 51
INTERNET_STATUS_HANDLE_CREATED          = 60
INTERNET_STATUS_HANDLE_CLOSING          = 70
INTERNET_STATUS_REQUEST_COMPLETE        = 100
INTERNET_STATUS_REDIRECT                = 110
INTERNET_STATUS_INTERMEDIATE_RESPONSE   = 120
INTERNET_STATUS_STATE_CHANGE            = 200
INTERNET_STATE_CONNECTED                = 1
INTERNET_STATE_DISCONNECTED             = 2
INTERNET_STATE_DISCONNECTED_BY_USER     = 10h
INTERNET_STATE_IDLE                     = 100h
INTERNET_STATE_BUSY                     = 200h
INTERNET_INVALID_STATUS_CALLBACK = 0ffffffffh
FTP_TRANSFER_TYPE_UNKNOWN       = 0
FTP_TRANSFER_TYPE_ASCII         = 1
FTP_TRANSFER_TYPE_BINARY        = 2
FTP_TRANSFER_TYPE_MASK          = (FTP_TRANSFER_TYPE_ASCII + FTP_TRANSFER_TYPE_BINARY)
MAX_GOPHER_DISPLAY_TEXT         = 128
MAX_GOPHER_SELECTOR_TEXT        = 256
MAX_GOPHER_HOST_NAME            = INTERNET_MAX_HOST_NAME_LENGTH
MAX_GOPHER_LOCATOR_LENGTH       = 1+ MAX_GOPHER_DISPLAY_TEXT+ 1 + MAX_GOPHER_SELECTOR_TEXT+ 1+ MAX_GOPHER_HOST_NAME+ 1+ INTERNET_MAX_PORT_NUMBER_LENGTH+ 1+ 1+ 2
GOPHER_TYPE_TEXT_FILE           = 1
GOPHER_TYPE_DIRECTORY           = 2
GOPHER_TYPE_CSO                 = 4
GOPHER_TYPE_ERROR               = 8
GOPHER_TYPE_MAC_BINHEX          = 10h
GOPHER_TYPE_DOS_ARCHIVE         = 20h
GOPHER_TYPE_UNIX_UUENCODED      = 40h
GOPHER_TYPE_INDEX_SERVER        = 80h
GOPHER_TYPE_TELNET              = 100h
GOPHER_TYPE_BINARY              = 200h
GOPHER_TYPE_REDUNDANT           = 400h
GOPHER_TYPE_TN3270              = 800h
GOPHER_TYPE_GIF                 = 1000h
GOPHER_TYPE_IMAGE               = 2000h
GOPHER_TYPE_BITMAP              = 4000h
GOPHER_TYPE_MOVIE               = 8000h
GOPHER_TYPE_SOUND               = 10000h
GOPHER_TYPE_HTML                = 20000h
GOPHER_TYPE_PDF                 = 40000h
GOPHER_TYPE_CALENDAR            = 80000h
GOPHER_TYPE_INLINE              = 100000h
GOPHER_TYPE_UNKNOWN             = 20000000h
GOPHER_TYPE_ASK                 = 40000000h
GOPHER_TYPE_GOPHER_PLUS         = 80000000h
GOPHER_TEMP                     = GOPHER_TYPE_TEXT_FILE+GOPHER_TYPE_MAC_BINHEX+GOPHER_TYPE_DOS_ARCHIVE+GOPHER_TYPE_UNIX_UUENCODED+GOPHER_TYPE_BINARY
GOPHER_TYPE_FILE_MASK           = GOPHER_TEMP+ GOPHER_TYPE_GIF+ GOPHER_TYPE_IMAGE+ GOPHER_TYPE_BITMAP+GOPHER_TYPE_MOVIE+GOPHER_TYPE_SOUND+ GOPHER_TYPE_HTML+GOPHER_TYPE_PDF+GOPHER_TYPE_CALENDAR+GOPHER_TYPE_INLINE
MAX_GOPHER_CATEGORY_NAME        = 128
MAX_GOPHER_ATTRIBUTE_NAME       = 128
MIN_GOPHER_ATTRIBUTE_LENGTH     = 256
GOPHER_ATTRIBUTE_ID_BASE        = 0abcccc00h
GOPHER_CATEGORY_ID_ALL          = (GOPHER_ATTRIBUTE_ID_BASE + 1)
GOPHER_CATEGORY_ID_INFO         = (GOPHER_ATTRIBUTE_ID_BASE + 2)
GOPHER_CATEGORY_ID_ADMIN        = (GOPHER_ATTRIBUTE_ID_BASE + 3)
GOPHER_CATEGORY_ID_VIEWS        = (GOPHER_ATTRIBUTE_ID_BASE + 4)
GOPHER_CATEGORY_ID_ABSTRACT     = (GOPHER_ATTRIBUTE_ID_BASE + 5)
GOPHER_CATEGORY_ID_VERONICA     = (GOPHER_ATTRIBUTE_ID_BASE + 6)
GOPHER_CATEGORY_ID_ASK          = (GOPHER_ATTRIBUTE_ID_BASE + 7)
GOPHER_CATEGORY_ID_UNKNOWN      = (GOPHER_ATTRIBUTE_ID_BASE + 8)
GOPHER_ATTRIBUTE_ID_ALL         = (GOPHER_ATTRIBUTE_ID_BASE + 9)
GOPHER_ATTRIBUTE_ID_ADMIN       = (GOPHER_ATTRIBUTE_ID_BASE + 10)
GOPHER_ATTRIBUTE_ID_MOD_DATE    = (GOPHER_ATTRIBUTE_ID_BASE + 11)
GOPHER_ATTRIBUTE_ID_TTL         = (GOPHER_ATTRIBUTE_ID_BASE + 12)
GOPHER_ATTRIBUTE_ID_SCORE       = (GOPHER_ATTRIBUTE_ID_BASE + 13)
GOPHER_ATTRIBUTE_ID_RANGE       = (GOPHER_ATTRIBUTE_ID_BASE + 14)
GOPHER_ATTRIBUTE_ID_SITE        = (GOPHER_ATTRIBUTE_ID_BASE + 15)
GOPHER_ATTRIBUTE_ID_ORG         = (GOPHER_ATTRIBUTE_ID_BASE + 16)
GOPHER_ATTRIBUTE_ID_LOCATION    = (GOPHER_ATTRIBUTE_ID_BASE + 17)
GOPHER_ATTRIBUTE_ID_GEOG        = (GOPHER_ATTRIBUTE_ID_BASE + 18)
GOPHER_ATTRIBUTE_ID_TIMEZONE    = (GOPHER_ATTRIBUTE_ID_BASE + 19)
GOPHER_ATTRIBUTE_ID_PROVIDER    = (GOPHER_ATTRIBUTE_ID_BASE + 20)
GOPHER_ATTRIBUTE_ID_VERSION     = (GOPHER_ATTRIBUTE_ID_BASE + 21)
GOPHER_ATTRIBUTE_ID_ABSTRACT    = (GOPHER_ATTRIBUTE_ID_BASE + 22)
GOPHER_ATTRIBUTE_ID_VIEW        = (GOPHER_ATTRIBUTE_ID_BASE + 23)
GOPHER_ATTRIBUTE_ID_TREEWALK    = (GOPHER_ATTRIBUTE_ID_BASE + 24)
GOPHER_ATTRIBUTE_ID_UNKNOWN     = (GOPHER_ATTRIBUTE_ID_BASE + 25)
HTTP_MAJOR_VERSION              = 1
HTTP_MINOR_VERSION              = 0
HTTP_VERSION                    equ "HTTP/1.0";A
HTTP_QUERY_MIME_VERSION         = 0
HTTP_QUERY_CONTENT_TYPE         = 1
HTTP_QUERY_CONTENT_TRANSFER_ENCODING = 2
HTTP_QUERY_CONTENT_ID           = 3
HTTP_QUERY_CONTENT_DESCRIPTION  = 4
HTTP_QUERY_CONTENT_LENGTH       = 5
HTTP_QUERY_CONTENT_LANGUAGE     = 6
HTTP_QUERY_ALLOW                = 7
HTTP_QUERY_PUBLIC               = 8
HTTP_QUERY_DATE                 = 9
HTTP_QUERY_EXPIRES              = 10
HTTP_QUERY_LAST_MODIFIED        = 11
HTTP_QUERY_MESSAGE_ID           = 12
HTTP_QUERY_URI                  = 13
HTTP_QUERY_DERIVED_FROM         = 14
HTTP_QUERY_COST                 = 15
HTTP_QUERY_LINK                 = 16
HTTP_QUERY_PRAGMA               = 17
HTTP_QUERY_VERSION              = 18
HTTP_QUERY_STATUS_CODE          = 19
HTTP_QUERY_STATUS_TEXT          = 20
HTTP_QUERY_RAW_HEADERS          = 21
HTTP_QUERY_RAW_HEADERS_CRLF     = 22
HTTP_QUERY_CONNECTION           = 23
HTTP_QUERY_ACCEPT               = 24
HTTP_QUERY_ACCEPT_CHARSET       = 25
HTTP_QUERY_ACCEPT_ENCODING      = 26
HTTP_QUERY_ACCEPT_LANGUAGE      = 27
HTTP_QUERY_AUTHORIZATION        = 28
HTTP_QUERY_CONTENT_ENCODING     = 29
HTTP_QUERY_FORWARDED            = 30
HTTP_QUERY_FROM                 = 31
HTTP_QUERY_IF_MODIFIED_SINCE    = 32
HTTP_QUERY_LOCATION             = 33
HTTP_QUERY_ORIG_URI             = 34
HTTP_QUERY_REFERER              = 35
HTTP_QUERY_RETRY_AFTER          = 36
HTTP_QUERY_SERVER               = 37
HTTP_QUERY_TITLE                = 38
HTTP_QUERY_USER_AGENT           = 39
HTTP_QUERY_WWW_AUTHENTICATE     = 40
HTTP_QUERY_PROXY_AUTHENTICATE   = 41
HTTP_QUERY_ACCEPT_RANGES        = 42
HTTP_QUERY_SET_COOKIE           = 43
HTTP_QUERY_COOKIE               = 44
HTTP_QUERY_REQUEST_METHOD       = 45
HTTP_QUERY_REFRESH              = 46
HTTP_QUERY_CONTENT_DISPOSITION  = 47
HTTP_QUERY_AGE                  = 48
HTTP_QUERY_CACHE_CONTROL    = 49
HTTP_QUERY_CONTENT_BASE     = 50
HTTP_QUERY_CONTENT_LOCATION = 51
HTTP_QUERY_CONTENT_MD5      = 52
HTTP_QUERY_CONTENT_RANGE    = 53
HTTP_QUERY_ETAG             = 54
HTTP_QUERY_HOST             = 55
HTTP_QUERY_IF_MATCH         = 56
HTTP_QUERY_IF_NONE_MATCH    = 57
HTTP_QUERY_IF_RANGE         = 58
HTTP_QUERY_IF_UNMODIFIED_SINCE = 59
HTTP_QUERY_MAX_FORWARDS     = 60
HTTP_QUERY_PROXY_AUTHORIZATION = 61
HTTP_QUERY_RANGE            = 62
HTTP_QUERY_TRANSFER_ENCODING = 63
HTTP_QUERY_UPGRADE          = 64
HTTP_QUERY_VARY             = 65
HTTP_QUERY_VIA              = 66
HTTP_QUERY_WARNING          = 67
HTTP_QUERY_MAX              = 67
HTTP_QUERY_CUSTOM           = 65535
HTTP_QUERY_FLAG_REQUEST_HEADERS = 80000000h
HTTP_QUERY_FLAG_SYSTEMTIME  = 40000000h
HTTP_QUERY_FLAG_NUMBER      = 20000000h
HTTP_QUERY_FLAG_COALESCE    = 10000000h
HTTP_QUERY_MODIFIER_FLAGS_MASK = (HTTP_QUERY_FLAG_REQUEST_HEADERS+HTTP_QUERY_FLAG_SYSTEMTIME+HTTP_QUERY_FLAG_NUMBER+HTTP_QUERY_FLAG_COALESCE)
HTTP_QUERY_HEADER_MASK      = not HTTP_QUERY_MODIFIER_FLAGS_MASK
HTTP_STATUS_CONTINUE        = 100
HTTP_STATUS_SWITCH_PROTOCOLS = 101
HTTP_STATUS_OK              = 200
HTTP_STATUS_CREATED         = 201
HTTP_STATUS_ACCEPTED        = 202
HTTP_STATUS_PARTIAL         = 203
HTTP_STATUS_NO_CONTENT      = 204
HTTP_STATUS_RESET_CONTENT   = 205
HTTP_STATUS_PARTIAL_CONTENT = 206
HTTP_STATUS_AMBIGUOUS       = 300
HTTP_STATUS_MOVED           = 301
HTTP_STATUS_REDIRECT        = 302
HTTP_STATUS_REDIRECT_METHOD = 303
HTTP_STATUS_NOT_MODIFIED    = 304
HTTP_STATUS_USE_PROXY       = 305
HTTP_STATUS_REDIRECT_KEEP_VERB = 307
HTTP_STATUS_BAD_REQUEST     = 400
HTTP_STATUS_DENIED          = 401
HTTP_STATUS_PAYMENT_REQ     = 402
HTTP_STATUS_FORBIDDEN       = 403
HTTP_STATUS_NOT_FOUND       = 404
HTTP_STATUS_BAD_METHOD      = 405
HTTP_STATUS_NONE_ACCEPTABLE = 406
HTTP_STATUS_PROXY_AUTH_REQ  = 407
HTTP_STATUS_REQUEST_TIMEOUT = 408
HTTP_STATUS_CONFLICT        = 409
HTTP_STATUS_GONE            = 410
HTTP_STATUS_LENGTH_REQUIRED = 411
HTTP_STATUS_PRECOND_FAILED  = 412
HTTP_STATUS_REQUEST_TOO_LARGE = 413
HTTP_STATUS_URI_TOO_LONG    = 414
HTTP_STATUS_UNSUPPORTED_MEDIA = 415
HTTP_STATUS_SERVER_ERROR    = 500
HTTP_STATUS_NOT_SUPPORTED   = 501
HTTP_STATUS_BAD_GATEWAY     = 502
HTTP_STATUS_SERVICE_UNAVAIL = 503
HTTP_STATUS_GATEWAY_TIMEOUT = 504
HTTP_STATUS_VERSION_NOT_SUP = 505
HTTP_STATUS_FIRST           = HTTP_STATUS_CONTINUE
HTTP_STATUS_LAST            = HTTP_STATUS_VERSION_NOT_SUP
HTTP_ADDREQ_INDEX_MASK      = 0FFFFh
HTTP_ADDREQ_FLAGS_MASK      = 0FFFF0000h
HTTP_ADDREQ_FLAG_ADD_IF_NEW = 10000000h
HTTP_ADDREQ_FLAG_ADD        = 20000000h
HTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA = 40000000h
HTTP_ADDREQ_FLAG_COALESCE_WITH_SEMICOLON = 1000000h
HTTP_ADDREQ_FLAG_COALESCE   = HTTP_ADDREQ_FLAG_COALESCE_WITH_COMMA
HTTP_ADDREQ_FLAG_REPLACE    = 80000000h
HSR_ASYNC       = WININET_API_FLAG_ASYNC
HSR_SYNC        = WININET_API_FLAG_SYNC
HSR_USE_CONTEXT = WININET_API_FLAG_USE_CONTEXT
HSR_INITIATE    = 8
HSR_DOWNLOAD    = 10h
HSR_CHUNKED     = 20h
FLAGS_ERROR_UI_FILTER_FOR_ERRORS            = 1
FLAGS_ERROR_UI_FLAGS_CHANGE_OPTIONS         = 2
FLAGS_ERROR_UI_FLAGS_GENERATE_DATA          = 4
FLAGS_ERROR_UI_FLAGS_NO_UI                  = 8
FLAGS_ERROR_UI_SERIALIZE_DIALOGS            = 10h
INTERNET_ERROR_BASE                         = 12000
ERROR_INTERNET_OUT_OF_HANDLES               = (INTERNET_ERROR_BASE + 1)
ERROR_INTERNET_TIMEOUT                      = (INTERNET_ERROR_BASE + 2)
ERROR_INTERNET_EXTENDED_ERROR               = (INTERNET_ERROR_BASE + 3)
ERROR_INTERNET_INTERNAL_ERROR               = (INTERNET_ERROR_BASE + 4)
ERROR_INTERNET_INVALID_URL                  = (INTERNET_ERROR_BASE + 5)
ERROR_INTERNET_UNRECOGNIZED_SCHEME          = (INTERNET_ERROR_BASE + 6)
ERROR_INTERNET_NAME_NOT_RESOLVED            = (INTERNET_ERROR_BASE + 7)
ERROR_INTERNET_PROTOCOL_NOT_FOUND           = (INTERNET_ERROR_BASE + 8)
ERROR_INTERNET_INVALID_OPTION               = (INTERNET_ERROR_BASE + 9)
ERROR_INTERNET_BAD_OPTION_LENGTH            = (INTERNET_ERROR_BASE + 10)
ERROR_INTERNET_OPTION_NOT_SETTABLE          = (INTERNET_ERROR_BASE + 11)
ERROR_INTERNET_SHUTDOWN                     = (INTERNET_ERROR_BASE + 12)
ERROR_INTERNET_INCORRECT_USER_NAME          = (INTERNET_ERROR_BASE + 13)
ERROR_INTERNET_INCORRECT_PASSWORD           = (INTERNET_ERROR_BASE + 14)
ERROR_INTERNET_LOGIN_FAILURE                = (INTERNET_ERROR_BASE + 15)
ERROR_INTERNET_INVALID_OPERATION            = (INTERNET_ERROR_BASE + 16)
ERROR_INTERNET_OPERATION_CANCELLED          = (INTERNET_ERROR_BASE + 17)
ERROR_INTERNET_INCORRECT_HANDLE_TYPE        = (INTERNET_ERROR_BASE + 18)
ERROR_INTERNET_INCORRECT_HANDLE_STATE       = (INTERNET_ERROR_BASE + 19)
ERROR_INTERNET_NOT_PROXY_REQUEST            = (INTERNET_ERROR_BASE + 20)
ERROR_INTERNET_REGISTRY_VALUE_NOT_FOUND     = (INTERNET_ERROR_BASE + 21)
ERROR_INTERNET_BAD_REGISTRY_PARAMETER       = (INTERNET_ERROR_BASE + 22)
ERROR_INTERNET_NO_DIRECT_ACCESS             = (INTERNET_ERROR_BASE + 23)
ERROR_INTERNET_NO_CONTEXT                   = (INTERNET_ERROR_BASE + 24)
ERROR_INTERNET_NO_CALLBACK                  = (INTERNET_ERROR_BASE + 25)
ERROR_INTERNET_REQUEST_PENDING              = (INTERNET_ERROR_BASE + 26)
ERROR_INTERNET_INCORRECT_FORMAT             = (INTERNET_ERROR_BASE + 27)
ERROR_INTERNET_ITEM_NOT_FOUND               = (INTERNET_ERROR_BASE + 28)
ERROR_INTERNET_CANNOT_CONNECT               = (INTERNET_ERROR_BASE + 29)
ERROR_INTERNET_CONNECTION_ABORTED           = (INTERNET_ERROR_BASE + 30)
ERROR_INTERNET_CONNECTION_RESET             = (INTERNET_ERROR_BASE + 31)
ERROR_INTERNET_FORCE_RETRY                  = (INTERNET_ERROR_BASE + 32)
ERROR_INTERNET_INVALID_PROXY_REQUEST        = (INTERNET_ERROR_BASE + 33)
ERROR_INTERNET_NEED_UI                      = (INTERNET_ERROR_BASE + 34)
ERROR_INTERNET_HANDLE_EXISTS                = (INTERNET_ERROR_BASE + 36)
ERROR_INTERNET_SEC_CERT_DATE_INVALID        = (INTERNET_ERROR_BASE + 37)
ERROR_INTERNET_SEC_CERT_CN_INVALID          = (INTERNET_ERROR_BASE + 38)
ERROR_INTERNET_HTTP_TO_HTTPS_ON_REDIR       = (INTERNET_ERROR_BASE + 39)
ERROR_INTERNET_HTTPS_TO_HTTP_ON_REDIR       = (INTERNET_ERROR_BASE + 40)
ERROR_INTERNET_MIXED_SECURITY               = (INTERNET_ERROR_BASE + 41)
ERROR_INTERNET_CHG_POST_IS_NON_SECURE       = (INTERNET_ERROR_BASE + 42)
ERROR_INTERNET_POST_IS_NON_SECURE           = (INTERNET_ERROR_BASE + 43)
ERROR_INTERNET_CLIENT_AUTH_CERT_NEEDED      = (INTERNET_ERROR_BASE + 44)
ERROR_INTERNET_INVALID_CA                   = (INTERNET_ERROR_BASE + 45)
ERROR_INTERNET_CLIENT_AUTH_NOT_SETUP        = (INTERNET_ERROR_BASE + 46)
ERROR_INTERNET_ASYNC_THREAD_FAILED          = (INTERNET_ERROR_BASE + 47)
ERROR_INTERNET_REDIRECT_SCHEME_CHANGE       = (INTERNET_ERROR_BASE + 48)
ERROR_INTERNET_DIALOG_PENDING               = (INTERNET_ERROR_BASE + 49)
ERROR_INTERNET_RETRY_DIALOG                 = (INTERNET_ERROR_BASE + 50)
ERROR_INTERNET_HTTPS_HTTP_SUBMIT_REDIR      = (INTERNET_ERROR_BASE + 52)
ERROR_INTERNET_INSERT_CDROM                 = (INTERNET_ERROR_BASE + 53)
ERROR_FTP_TRANSFER_IN_PROGRESS              = (INTERNET_ERROR_BASE + 110)
ERROR_FTP_DROPPED                           = (INTERNET_ERROR_BASE + 111)
ERROR_FTP_NO_PASSIVE_MODE                   = (INTERNET_ERROR_BASE + 112)
ERROR_GOPHER_PROTOCOL_ERROR                 = (INTERNET_ERROR_BASE + 130)
ERROR_GOPHER_NOT_FILE                       = (INTERNET_ERROR_BASE + 131)
ERROR_GOPHER_DATA_ERROR                     = (INTERNET_ERROR_BASE + 132)
ERROR_GOPHER_END_OF_DATA                    = (INTERNET_ERROR_BASE + 133)
ERROR_GOPHER_INVALID_LOCATOR                = (INTERNET_ERROR_BASE + 134)
ERROR_GOPHER_INCORRECT_LOCATOR_TYPE         = (INTERNET_ERROR_BASE + 135)
ERROR_GOPHER_NOT_GOPHER_PLUS                = (INTERNET_ERROR_BASE + 136)
ERROR_GOPHER_ATTRIBUTE_NOT_FOUND            = (INTERNET_ERROR_BASE + 137)
ERROR_GOPHER_UNKNOWN_LOCATOR                = (INTERNET_ERROR_BASE + 138)
ERROR_HTTP_HEADER_NOT_FOUND                 = (INTERNET_ERROR_BASE + 150)
ERROR_HTTP_DOWNLEVEL_SERVER                 = (INTERNET_ERROR_BASE + 151)
ERROR_HTTP_INVALID_SERVER_RESPONSE          = (INTERNET_ERROR_BASE + 152)
ERROR_HTTP_INVALID_HEADER                   = (INTERNET_ERROR_BASE + 153)
ERROR_HTTP_INVALID_QUERY_REQUEST            = (INTERNET_ERROR_BASE + 154)
ERROR_HTTP_HEADER_ALREADY_EXISTS            = (INTERNET_ERROR_BASE + 155)
ERROR_HTTP_REDIRECT_FAILED                  = (INTERNET_ERROR_BASE + 156)
ERROR_HTTP_NOT_REDIRECTED                   = (INTERNET_ERROR_BASE + 160)
ERROR_HTTP_COOKIE_NEEDS_CONFIRMATION        = (INTERNET_ERROR_BASE + 161)
ERROR_HTTP_COOKIE_DECLINED                  = (INTERNET_ERROR_BASE + 162)
ERROR_HTTP_REDIRECT_NEEDS_CONFIRMATION      = (INTERNET_ERROR_BASE + 168)
ERROR_INTERNET_SECURITY_CHANNEL_ERROR       = (INTERNET_ERROR_BASE + 157)
ERROR_INTERNET_UNABLE_TO_CACHE_FILE         = (INTERNET_ERROR_BASE + 158)
ERROR_INTERNET_TCPIP_NOT_INSTALLED          = (INTERNET_ERROR_BASE + 159)
ERROR_INTERNET_DISCONNECTED                 = (INTERNET_ERROR_BASE + 163)
ERROR_INTERNET_SERVER_UNREACHABLE           = (INTERNET_ERROR_BASE + 164)
ERROR_INTERNET_PROXY_SERVER_UNREACHABLE     = (INTERNET_ERROR_BASE + 165)
ERROR_INTERNET_BAD_AUTO_PROXY_SCRIPT        = (INTERNET_ERROR_BASE + 166)
ERROR_INTERNET_UNABLE_TO_DOWNLOAD_SCRIPT    = (INTERNET_ERROR_BASE + 167)
ERROR_INTERNET_SEC_INVALID_CERT             = (INTERNET_ERROR_BASE + 169)
ERROR_INTERNET_SEC_CERT_REVOKED             = (INTERNET_ERROR_BASE + 170)
ERROR_INTERNET_FAILED_DUETOSECURITYCHECK    = (INTERNET_ERROR_BASE + 171)
INTERNET_ERROR_LAST                         = ERROR_INTERNET_FAILED_DUETOSECURITYCHECK
NORMAL_CACHE_ENTRY          = 1
COOKIE_CACHE_ENTRY          = 100000h
URLHISTORY_CACHE_ENTRY      = 200000h
TRACK_OFFLINE_CACHE_ENTRY   = 10h
TRACK_ONLINE_CACHE_ENTRY    = 20h
STICKY_CACHE_ENTRY          = 4
SPARSE_CACHE_ENTRY          = 10000h
URLCACHE_FIND_DEFAULT_FILTER = NORMAL_CACHE_ENTRY+COOKIE_CACHE_ENTRY+URLHISTORY_CACHE_ENTRY+TRACK_OFFLINE_CACHE_ENTRY+TRACK_ONLINE_CACHE_ENTRY+STICKY_CACHE_ENTRY
CACHE_ENTRY_ATTRIBUTE_FC    = 4
CACHE_ENTRY_HITRATE_FC      = 10h
CACHE_ENTRY_MODTIME_FC      = 40h
CACHE_ENTRY_EXPTIME_FC      = 80h
CACHE_ENTRY_ACCTIME_FC      = 100h
CACHE_ENTRY_SYNCTIME_FC     = 200h
CACHE_ENTRY_HEADERINFO_FC   = 400h
CACHE_ENTRY_EXEMPT_DELTA_FC = 800h
INTERNET_DIAL_UNATTENDED    = 8000h
INTERENT_GOONLINE_REFRESH   = 1
INTERENT_GOONLINE_MASK      = 1
INTERNET_AUTODIAL_FORCE_ONLINE          = 1
INTERNET_AUTODIAL_FORCE_UNATTENDED      = 2
INTERNET_AUTODIAL_FAILIFSECURITYCHECK   = 4
INTERNET_AUTODIAL_FLAGS_MASK = (INTERNET_AUTODIAL_FORCE_ONLINE + INTERNET_AUTODIAL_FORCE_UNATTENDED + INTERNET_AUTODIAL_FAILIFSECURITYCHECK)
INTERNET_CONNECTION_MODEM   = 1
INTERNET_CONNECTION_LAN     = 2
INTERNET_CONNECTION_PROXY   = 4
INTERNET_CONNECTION_MODEM_BUSY          = 8
INTERNET_CUSTOMDIAL_CONNECT             = 0
INTERNET_CUSTOMDIAL_UNATTENDED          = 1
INTERNET_CUSTOMDIAL_DISCONNECT          = 2
INTERNET_CUSTOMDIAL_SHOWOFFLINE         = 4
INTERNET_CUSTOMDIAL_SAFE_FOR_UNATTENDED = 1
INTERNET_CUSTOMDIAL_WILL_SUPPLY_STATE   = 2
INTERNET_CUSTOMDIAL_CAN_HANGUP          = 4
INTERNET_DIALSTATE_DISCONNECTED         = 1
ISO_FORCE_DISCONNECTED  = 1
INTERNET_SCHEME_PARTIAL = -2
INTERNET_SCHEME_UNKNOWN = -1
INTERNET_SCHEME_DEFAULT = 0
INTERNET_SCHEME_FTP     = 1
INTERNET_SCHEME_GOPHER  = 2
INTERNET_SCHEME_HTTP    = 3
INTERNET_SCHEME_HTTPS   = 4
INTERNET_SCHEME_FILE    = 5
INTERNET_SCHEME_NEWS    = 6
INTERNET_SCHEME_MAILTO  = 7
INTERNET_SCHEME_SOCKS   = 8
INTERNET_SCHEME_FIRST   = INTERNET_SCHEME_FTP
INTERNET_SCHEME_LAST    = INTERNET_SCHEME_SOCKS

INTERNET_ASYNC_RESULT struct
 dwResult   dd ?
 dwError    dd ?
INTERNET_ASYNC_RESULT ends

INTERNET_PROXY_INFO struct
 dwAccessType       dd ?
 lpszProxy          dd ?
 lpszProxyBypass    dd ?
INTERNET_PROXY_INFO ends

INTERNET_VERSION_INFO struct
 dwMajorVersion dd ?
 dwMinorVersion dd ?
INTERNET_VERSION_INFO ends

HTTP_VERSION_INFO struct
 dwMajorVersion dd ?
 dwMinorVersion dd ?
HTTP_VERSION_INFO ends

INTERNET_CONNECTED_INFO struct
 dwConnectedState   dd ?
 dwFlags            dd ?
INTERNET_CONNECTED_INFO ends

URL_COMPONENTS struct ;dword
 dwStructSize       dd ?
 lpszScheme         dd ?
 dwSchemeLength     dd ?
 nScheme            dd ?
 lpszHostName       dd ?
 dwHostNameLength   dd ?
 nPort              dw ?
 lpszUserName       dd ?
 dwUserNameLength   dd ?
 lpszPassword       dd ?
 dwPasswordLength   dd ?
 lpszUrlPath        dd ?
 dwUrlPathLength    dd ?
 lpszExtraInfo      dd ?
 dwExtraInfoLength  dd ?
URL_COMPONENTS ends

INTERNET_CERTIFICATE_INFO struct
 ftExpiry               FILETIME <>
 ftStart                FILETIME <>
 lpszSubjectInfo        dd ?
 lpszIssuerInfo         dd ?
 lpszProtocolName       dd ?
 lpszSignatureAlgName   dd ?
 lpszEncryptionAlgName  dd ?
 dwKeySize              dd ?
INTERNET_CERTIFICATE_INFO ends

INTERNET_BUFFERS struct
 dwStructSize   dd ?
 Next           dd ?
 lpcszHeader    dd ?
 dwHeadersLength dd ?
 dwHeadersTotal dd ?
 lpvBuffer      dd ?
 dwBufferLength dd ?
 dwBufferTotal  dd ?
 dwOffsetLow    dd ?
 dwOffsetHigh   dd ?
INTERNET_BUFFERS ends

GOPHER_FIND_DATA struct
 DisplayString TCHAR MAX_GOPHER_DISPLAY_TEXT + 1 dup(?)
 GopherType dd ?
 SizeLow    dd ?
 SizeHigh   dd ?
 LastModificationTime FILETIME <>
 Locator    TCHAR MAX_GOPHER_LOCATOR_LENGTH + 1 dup(?)
GOPHER_FIND_DATA ends

GOPHER_ADMIN_ATTRIBUTE_TYPE struct
 Comment        dd ?
 EmailAddress   dd ?
GOPHER_ADMIN_ATTRIBUTE_TYPE ends

GOPHER_MOD_DATE_ATTRIBUTE_TYPE struct
 DateAndTime FILETIME <>
GOPHER_MOD_DATE_ATTRIBUTE_TYPE ends

GOPHER_TTL_ATTRIBUTE_TYPE struct
 Ttl dd ?
GOPHER_TTL_ATTRIBUTE_TYPE ends

GOPHER_SCORE_ATTRIBUTE_TYPE struct
 Score dd ?
GOPHER_SCORE_ATTRIBUTE_TYPE ends

GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE struct
 LowerBound dd ?
 UpperBound dd ?
GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE ends

GOPHER_SITE_ATTRIBUTE_TYPE struct
 Site dd ?
GOPHER_SITE_ATTRIBUTE_TYPE ends

GOPHER_ORGANIZATION_ATTRIBUTE_TYPE struct
 Organization dd ?
GOPHER_ORGANIZATION_ATTRIBUTE_TYPE ends

GOPHER_LOCATION_ATTRIBUTE_TYPE struct
 Location dd ?
GOPHER_LOCATION_ATTRIBUTE_TYPE ends

GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE struct
 DegreesNorth   dd ?
 MinutesNorth   dd ?
 SecondsNorth   dd ?
 DegreesEast    dd ?
 MinutesEast    dd ?
 SecondsEast    dd ?
GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE ends

GOPHER_TIMEZONE_ATTRIBUTE_TYPE struct
 Zone dd ?
GOPHER_TIMEZONE_ATTRIBUTE_TYPE ends

GOPHER_PROVIDER_ATTRIBUTE_TYPE struct
 Provider dd ?
GOPHER_PROVIDER_ATTRIBUTE_TYPE ends

GOPHER_VERSION_ATTRIBUTE_TYPE struct
 Version dd ?
GOPHER_VERSION_ATTRIBUTE_TYPE ends

GOPHER_ABSTRACT_ATTRIBUTE_TYPE struct
 ShortAbstract  dd ?
 AbstractFile   dd ?
GOPHER_ABSTRACT_ATTRIBUTE_TYPE ends

GOPHER_VIEW_ATTRIBUTE_TYPE struct
 ContentType    dd ?
 Language       dd ?
 iSize          dd ?
GOPHER_VIEW_ATTRIBUTE_TYPE ends

GOPHER_VERONICA_ATTRIBUTE_TYPE struct
 TreeWalk dd ?
GOPHER_VERONICA_ATTRIBUTE_TYPE ends

GOPHER_ASK_ATTRIBUTE_TYPE struct
 QuestionType dd ?
 QuestionText dd ?
GOPHER_ASK_ATTRIBUTE_TYPE ends

GOPHER_UNKNOWN_ATTRIBUTE_TYPE struct
 Text dd ?
GOPHER_UNKNOWN_ATTRIBUTE_TYPE ends

GOPHER_ATTRIBUTE_TYPE struct
 CategoryId     dd ?
 AttributeId    dd ?
 union ;AttributeType
     Admin      GOPHER_ADMIN_ATTRIBUTE_TYPE <>
     ModDate    GOPHER_MOD_DATE_ATTRIBUTE_TYPE <>
     Ttl        GOPHER_TTL_ATTRIBUTE_TYPE <>
     Score      GOPHER_SCORE_ATTRIBUTE_TYPE <>
     ScoreRange GOPHER_SCORE_RANGE_ATTRIBUTE_TYPE <>
     Site       GOPHER_SITE_ATTRIBUTE_TYPE <>
     Organization GOPHER_ORGANIZATION_ATTRIBUTE_TYPE <>
     Location   GOPHER_LOCATION_ATTRIBUTE_TYPE <>
     GeographicalLocation GOPHER_GEOGRAPHICAL_LOCATION_ATTRIBUTE_TYPE <>
     TimeZone   GOPHER_TIMEZONE_ATTRIBUTE_TYPE <>
     Provider   GOPHER_PROVIDER_ATTRIBUTE_TYPE <>
     Version    GOPHER_VERSION_ATTRIBUTE_TYPE <>
     Abstract   GOPHER_ABSTRACT_ATTRIBUTE_TYPE <>
     View       GOPHER_VIEW_ATTRIBUTE_TYPE <>
     Veronica   GOPHER_VERONICA_ATTRIBUTE_TYPE <>
     Ask        GOPHER_ASK_ATTRIBUTE_TYPE <>
     Unknown    GOPHER_UNKNOWN_ATTRIBUTE_TYPE <>
 ends
GOPHER_ATTRIBUTE_TYPE ends

INTERNET_AUTH_NOTIFY_DATA struct
 cbStruct   dd ?
 dwOptions  dd ?
 pfnNotify  dd ?
 dwContext  dd ?
INTERNET_AUTH_NOTIFY_DATA ends

INTERNET_CACHE_ENTRY_INFO struct
 dwStructSize       dd ?
 lpszSourceUrlName  dd ?
 lpszLocalFileName  dd ?
 CacheEntryType     dd ?
 dwUseCount         dd ?
 dwHitRate          dd ?
 dwSizeLow          dd ?
 dwSizeHigh         dd ?
 LastModifiedTime   FILETIME <>
 ExpireTime         FILETIME <>
 LastAccessTime     FILETIME <>
 LastSyncTime       FILETIME <>
 lpHeaderInfo       dd ?
 dwHeaderInfoSize   dd ?
 lpszFileExtension  dd ?
 union
   dwReserved       dd ?
   dwExemptDelta    dd ?
 ends
INTERNET_CACHE_ENTRY_INFO ends

; ----------------------------- shlobj.h -----------------------------

CMF_NORMAL              = 0
CMF_DEFAULTONLY         = 1
CMF_VERBSONLY           = 2
CMF_EXPLORE             = 4
CMF_NOVERBS             = 8
CMF_CANRENAME           = 10h
CMF_NODEFAULT           = 20h
CMF_INCLUDESTATIC       = 40h
CMF_RESERVED            = 0ffff0000h
GCS_VERBA               = 0
GCS_VERBW               = 4
if UNICODE eq TRUE
    GCS_VERB = GCS_VERBW
else
    GCS_VERB = GCS_VERBA
end if

GCS_HELPTEXTA           = 1
GCS_HELPTEXTW           = 5
if UNICODE eq TRUE
    GCS_HELPTEXT = GCS_HELPTEXTW
else
    GCS_HELPTEXT = GCS_HELPTEXTA
end if

GCS_VALIDATEA           = 2
GCS_VALIDATEW           = 6
if UNICODE eq TRUE
    GCS_VALIDATE = GCS_VALIDATEW
else
    GCS_VALIDATE = GCS_VALIDATEA
end if

GCS_UNICODE             = 4
CMDSTR_NEWFOLDER       equ "NewFolder"
CMDSTR_VIEWLIST        equ "ViewList"
CMDSTR_VIEWDETAILS     equ "ViewDetails"

CMIC_MASK_HOTKEY        = SEE_MASK_HOTKEY
CMIC_MASK_ICON          = SEE_MASK_ICON
CMIC_MASK_FLAG_NO_UI    = SEE_MASK_FLAG_NO_UI
CMIC_MASK_UNICODE       = SEE_MASK_UNICODE
CMIC_MASK_NO_CONSOLE    = SEE_MASK_NO_CONSOLE
;CMIC_MASK_HASLINKNAME   = SEE_MASK_HASLINKNAME
;CMIC_MASK_FLAG_SEP_VDM  = SEE_MASK_FLAG_SEPVDM
;CMIC_MASK_HASTITLE      = SEE_MASK_HASTITLE
CMIC_MASK_ASYNCOK       = SEE_MASK_ASYNCOK
CMIC_MASK_PTINVOKE      = 20000000h
ISIOI_SYSIMAGELISTINDEX = 4
SBSP_DEFBROWSER         = 0
SBSP_SAMEBROWSER        = 1
SBSP_NEWBROWSER         = 2
SBSP_DEFMODE            = 0
SBSP_OPENMODE           = 10h
SBSP_EXPLOREMODE        = 20h
SBSP_ABSOLUTE           = 0
SBSP_RELATIVE           = 1000h
SBSP_PARENT             = 2000h
SBSP_NAVIGATEBACK       = 4000h
SBSP_NAVIGATEFORWARD    = 8000h
SBSP_ALLOW_AUTONAVIGATE = 10000h
SBSP_INITIATEDBYHLINKFRAME = 80000000h
SBSP_REDIRECT           = 40000000h
SBSP_WRITENOHISTORY     = 8000000h
SBSP_NOAUTOSELECT       = 4000000h
FCW_STATUS              = 1
FCW_TOOLBAR             = 2
FCW_TREE                = 3
FCW_INTERNETBAR         = 6
FCW_PROGRESS            = 8
FCT_MERGE               = 1
FCT_CONFIGABLE          = 2
FCT_ADDTOEND            = 4
CDBOSC_SETFOCUS         = 0
CDBOSC_KILLFOCUS        = 1
CDBOSC_SELCHANGE        = 2
CDBOSC_RENAME           = 3
SVSI_DESELECT           = 0
SVSI_SELECT             = 1
SVSI_EDIT               = 3
SVSI_DESELECTOTHERS     = 4
SVSI_ENSUREVISIBLE      = 8
SVSI_FOCUSED            = 10h
SVSI_TRANSLATEPT        = 20h
SVGIO_BACKGROUND        = 0
SVGIO_SELECTION         = 1
SVGIO_ALLVIEW           = 2
SV2GV_CURRENTVIEW       = 0ffffffffh
SV2GV_DEFAULTVIEW       = 0fffffffeh
STRRET_WSTR             = 0
STRRET_OFFSET           = 1
STRRET_CSTR             = 2
DROPEFFECT_COPY         = 1
SFGAO_CANCOPY           = DROPEFFECT_COPY
DROPEFFECT_MOVE         = 2
SFGAO_CANMOVE           = DROPEFFECT_MOVE
DROPEFFECT_LINK         = 3
SFGAO_CANLINK           = DROPEFFECT_LINK
SFGAO_CANRENAME         = 10h
SFGAO_CANDELETE         = 20h
SFGAO_HASPROPSHEET      = 40h
SFGAO_DROPTARGET        = 100h
SFGAO_CAPABILITYMASK    = 177h
SFGAO_LINK              = 10000h
SFGAO_SHARE             = 20000h
SFGAO_READONLY          = 40000h
SFGAO_GHOSTED           = 80000h
SFGAO_HIDDEN            = 80000h
SFGAO_DISPLAYATTRMASK   = 0F0000h
SFGAO_FILESYSANCESTOR   = 10000000h
SFGAO_FOLDER            = 20000000h
SFGAO_FILESYSTEM        = 40000000h
SFGAO_HASSUBFOLDER      = 80000000h
SFGAO_CONTENTSMASK      = 80000000h
SFGAO_VALIDATE          = 1000000h
SFGAO_REMOVABLE         = 2000000h
SFGAO_COMPRESSED        = 4000000h
SFGAO_BROWSABLE         = 8000000h
SFGAO_NONENUMERATED     = 100000h
SFGAO_NEWCONTENT        = 200000h
DBIM_MINSIZE            = 1
DBIM_MAXSIZE            = 2
DBIM_INTEGRAL           = 4
DBIM_ACTUAL             = 8
DBIM_TITLE              = 10h
DBIM_MODEFLAGS          = 20h
DBIM_BKCOLOR            = 40h
DBIMF_NORMAL            = 0
DBIMF_VARIABLEHEIGHT    = 8
DBIMF_DEBOSSED          = 20h
DBIMF_BKCOLOR           = 40h
DBIF_VIEWMODE_NORMAL    = 0
DBIF_VIEWMODE_VERTICAL  = 1
DBIF_VIEWMODE_FLOATING  = 2
DBIF_VIEWMODE_TRANSPARENT = 4
COMP_ELEM_TYPE          = 0x00000001
COMP_ELEM_CHECKED       = 0x00000002
COMP_ELEM_DIRTY         = 0x00000004
COMP_ELEM_NOSCROLL      = 0x00000008
COMP_ELEM_POS_LEFT      = 0x00000010
COMP_ELEM_POS_TOP       = 0x00000020
COMP_ELEM_SIZE_WIDTH    = 0x00000040
COMP_ELEM_SIZE_HEIGHT   = 0x00000080
COMP_ELEM_POS_ZINDEX    = 0x00000100
COMP_ELEM_SOURCE        = 0x00000200
COMP_ELEM_FRIENDLYNAME  = 0x00000400
COMP_ELEM_SUBSCRIBEDURL = 0x00000800
COMP_ELEM_ALL = (COMP_ELEM_TYPE+COMP_ELEM_CHECKED+COMP_ELEM_DIRTY+COMP_ELEM_NOSCROLL+COMP_ELEM_POS_LEFT+COMP_ELEM_SIZE_WIDTH+COMP_ELEM_SIZE_HEIGHT+COMP_ELEM_POS_ZINDEX+COMP_ELEM_SOURCE+COMP_ELEM_FRIENDLYNAME)

CFSTR_SHELLIDLIST       equ "Shell IDList Array"
CFSTR_SHELLIDLISTOFFSET equ "Shell Object Offsets"
CFSTR_NETRESOURCES      equ "Net Resource"
CFSTR_FILEDESCRIPTORA   equ "FileGroupDescriptor"
CFSTR_FILEDESCRIPTORW   equ "FileGroupDescriptorW"
CFSTR_FILECONTENTS      equ "FileContents"
CFSTR_FILENAMEA         equ "FileName"
CFSTR_FILENAMEW         equ "FileNameW"
CFSTR_PRINTERGROUP      equ "PrinterFriendlyName"
CFSTR_FILENAMEMAPA      equ "FileNameMap"
CFSTR_FILENAMEMAPW      equ "FileNameMapW"
CFSTR_SHELLURL          equ "UniformResourceLocator"
CFSTR_PREFERREDDROPEFFECT equ "Preferred DropEffect"
CFSTR_PERFORMEDDROPEFFECT equ "Performed DropEffect"
CFSTR_PASTESUCCEEDED    equ "Paste Succeeded"
CFSTR_INDRAGLOOP        equ "InShellDragLoop"

match =TRUE, UNICODE {
    CFSTR_FILEDESCRIPTOR    equ CFSTR_FILEDESCRIPTORW
    CFSTR_FILENAME          equ CFSTR_FILENAMEW
    CFSTR_FILENAMEMAP       equ CFSTR_FILENAMEMAPW }
match =FAlSE, UNICODE {
    CFSTR_FILEDESCRIPTOR    equ CFSTR_FILEDESCRIPTORA
    CFSTR_FILENAME          equ CFSTR_FILENAMEA
    CFSTR_FILENAMEMAP       equ CFSTR_FILENAMEMAPA }

SHCNF_IDLIST      = 0x0000
SHCNF_PATHA       = 0x0001
SHCNF_PRINTERA    = 0x0002
SHCNF_DWORD       = 0x0003
SHCNF_PATHW       = 0x0005
SHCNF_PRINTERW    = 0x0006
SHCNF_TYPE        = 0x00FF
SHCNF_FLUSH       = 0x1000
SHCNF_FLUSHNOWAIT = 0x2000

if UNICODE eq TRUE
    SHCNF_PATH      = SHCNF_PATHW
    SHCNF_PRINTER   = SHCNF_PRINTERW
else
    SHCNF_PATH      = SHCNF_PATHA
    SHCNF_PRINTER   = SHCNF_PRINTERA
end if

SLR_NO_UI               = 1
SLR_ANY_MATCH           = 2
SLR_UPDATE              = 4
SLR_NOUPDATE            = 8
SLGP_SHORTPATH          = 1
SLGP_UNCPRIORITY        = 2
SLGP_RAWPATH            = 4
FWF_AUTOARRANGE         = 1
FWF_ABBREVIATEDNAMES    = 2
FWF_SNAPTOGRID          = 4
FWF_OWNERDATA           = 8
FWF_BESTFITWINDOW       = 10h
FWF_DESKTOP             = 20h
FWF_SINGLESEL           = 40h
FWF_NOSUBFOLDERS        = 80h
FWF_TRANSPARENT         = 100h
FWF_NOCLIENTEDGE        = 200h
FWF_NOSCROLL            = 400h
FWF_ALIGNLEFT           = 800h
FWF_NOICONS             = 1000h
FWF_SINGLECLICKACTIVATE = 8000h
FVM_ICON                = 1
FVM_SMALLICON           = 2
FVM_LIST                = 3
FVM_DETAILS             = 4
SBSC_HIDE               = 0
SBSC_SHOW               = 1
SBSC_TOGGLE             = 2
SBSC_QUERY              = 3
SBO_DEFAULT             = 0
SBO_NOBROWSERPAGES      = 1
SVUIA_DEACTIVATE        = 0
SVUIA_ACTIVATE_NOFOCUS  = 1
SVUIA_ACTIVATE_FOCUS    = 2
SVUIA_INPLACEACTIVATE   = 3
SHGDN_NORMAL            = 0
SHGDN_INFOLDER          = 1
SHGDN_INCLUDE_NONFILESYS = 2000h
SHGDN_FORADDRESSBAR     = 4000h
SHGDN_FORPARSING        = 8000h
SHCONTF_FOLDERS         = 32
SHCONTF_NONFOLDERS      = 64
SHCONTF_INCLUDEHIDDEN   = 128
DBID_BANDINFOCHANGED    = 0
DBID_SHOWONLY           = 1
DBID_MAXIMIZEBAND       = 2
DTI_ADDUI_DEFAULT       = 0
DTI_ADDUI_DISPSUBWIZARD = 1
FD_CLSID        = 1
FD_SIZEPOINT    = 2
FD_ATTRIBUTES   = 4
FD_CREATETIME   = 8
FD_ACCESSTIME   = 10h
FD_WRITESTIME   = 20h
FD_FILESIZE     = 40h
FD_LINKUI       = 8000h

;SHELLFLAGSTATE record fShowAllObjects:1,fShowExtensions:1, fNoConfirmRecycle:1,fShowSysFiles:1,fShowCompColor:1,fDoubleClickInWebView:1,fDesktopHTML:1,fWin95Classic:1,fDontPrettyPath:1,fShowAttribCol:1,fMapNetDrvBtn:1,fShowInfoTip:1,fHideIcons:1, fRestFlags:3

SHITEMID struct
 cb     dw ?
 abID   db 1 dup(?)     ; variable length
SHITEMID ends

ITEMIDLIST struct
 mkid SHITEMID <>
ITEMIDLIST ends

CMINVOKECOMMANDINFO struct
 cbSize         dd ?
 fMask          dd ?
 hwnd           dd ?
 lpVerb         dd ?
 lpParameters   dd ?
 lpDirectory    dd ?
 nShow          dd ?
 dwHotKey       dd ?
 hIcon          dd ?
CMINVOKECOMMANDINFO ends

CMINVOKECOMMANDINFOEX struct
 cbSize         dd ?
 fMask          dd ?
 hwnd           dd ?
 lpVerb         dd ?
 lpParameters   dd ?
 lpDirectory    dd ?
 nShow          dd ?
 dwHotKey       dd ?
 hIcon          dd ?
 lpTitle        dd ?
 lpVerbW        dd ?
 lpParametersW  dd ?
 lpDirectoryW   dd ?
 lpTitleW       dd ?
 ptInvoke       POINT <>
CMINVOKECOMMANDINFOEX ends

FVSHOWINFO struct
 cbSize     dd ?
 hwndOwner  dd ?
 iShow      dd ?
 dwFlags    dd ?
 rect       RECT <>
 punkRel    dd ?
 strNewFile db MAX_PATH dup(?)
FVSHOWINFO ends

FOLDERSETTINGS struct
 ViewMode   dd ?
 fFlags     dd ?
FOLDERSETTINGS ends

SV2CVW2_PARAMS struct
 cbSize     dd ?
 psvPrev    dd ?
 pfs        dd ?
 psbOwner   dd ?
 prcView    dd ?
 pvid       dd ?
 hwndView   dd ?
SV2CVW2_PARAMS ends

BROWSEINFO struct
 hwndOwner      dd ?
 pidlRoot       dd ?
 pszDisplayName dd ?
 lpszTitle      dd ?
 ulFlags        dd ?
 lpfn           dd ?
 lParam         dd ?
 iImage         dd ?
BROWSEINFO ends

DESKBANDINFO struct
 dwMask         dd ?
 ptMinSize      POINT <>
 ptMaxSize      POINT <>
 ptIntegral     POINT <>
 ptActual       POINT <>
 wszTitle       WCHAR 256 dup(?)
 dwModeFlags    dd ?
 crBkgnd        COLORREF ?
DESKBANDINFO ends

WALLPAPEROPT struct
 dwSize     dd ?
 dwStyle    dd ?
WALLPAPEROPT ends

COMPONENTSOPT struct
 dwSize             dd ?
 fEnableComponents  dd ?
 fActiveDesktop     dd ?
COMPONENTSOPT ends

COMPPOS struct
 dwSize                 dd ?
 iLeft                  dd ?
 iTop                   dd ?
 dwWidth                dd ?
 dwHeight               dd ?
 izIndex                dd ?
 fCanResize             dd ?
 fCanResizeX            dd ?
 fCanResizeY            dd ?
 iPreferredLeftPercent  dd ?
 iPreferredTopPercent   dd ?
COMPPOS ends

COMPONENT struct
 dwSize     dd ?
 dwID       dd ?
 iComponentType dd ?
 fChecked   dd ?
 fDirty     dd ?
 fNoScroll  dd ?
 cpPos      COMPPOS <>
 wszFriendlyName WCHAR MAX_PATH dup(?)
 wszSource WCHAR INTERNET_MAX_URL_LENGTH dup(?)
 wszSubscribedURL WCHAR INTERNET_MAX_URL_LENGTH dup(?)
COMPONENT ends

NRESARRAY struct
 cItems dd ?
 nr NETRESOURCE <>
NRESARRAY ends

CIDA struct
 cidl dd ?
 aoffset dd 1 dup(?)
CIDA ends

FILEDESCRIPTOR struct
 dwFlags        dd ?
 clsid          CLSID    <>
 sizel          SIZEL    <>
 pointl         POINTL  <>
 dwFileAttributes dd ?
 ftCreationTime FILETIME <>
 ftLastAccessTime FILETIME <>
 ftLastWriteTime FILETIME <>
 nFileSizeHigh  dd ?
 nFileSizeLow   dd ?
 cFileName      TCHAR MAX_PATH dup(?)
FILEDESCRIPTOR ends

FILEGROUPDESCRIPTOR struct
 cItems dd ?
 fgd FILEDESCRIPTOR <>
FILEGROUPDESCRIPTOR ends

DROPFILES struct
 pFiles dd ?
 pt     POINT <>
 fNC    dd ?
 fWide  dd ?
DROPFILES ends

SHDESCRIPTIONID struct
 dwDescriptionId    dd ?
 clsid              CLSID <>
SHDESCRIPTIONID ends

;;;; end shlapi

;;;; riched

; -------------------------- riched structures -----------------------------

CHARFORMAT struct
  cbSize            DWORD      ?
  dwMask            DWORD      ?
  dwEffects         DWORD      ?
  yHeight           DWORD      ?
  yOffset           DWORD      ?
  crTextColor       COLORREF   ?
  bCharSet          BYTE       ?
  bPitchAndFamily   BYTE       ?
  szFaceName        TCHAR LF_FACESIZE dup(?)
  _wPad2            WORD       ?
CHARFORMAT ends

CHARRANGE struct
  cpMin  DWORD      ?
  cpMax  DWORD      ?
CHARRANGE ends

TEXTRANGE struct
  chrg          CHARRANGE <>
  lpstrText     DWORD      ?
TEXTRANGE ends

EDITSTREAM struct
  dwCookie      DWORD      ?
  dwError       DWORD      ?
  pfnCallback   DWORD      ?
EDITSTREAM ends

FINDTEXT struct
  chrg          CHARRANGE  <>
  lpstrText     DWORD      ?
FINDTEXT ends

FINDTEXTEX struct
  chrg          CHARRANGE <>
  lpstrText     DWORD      ?
  chrgText      CHARRANGE <>
FINDTEXTEX ends

FORMATRANGE struct
  hdc           DWORD      ?
  hdcTarget     DWORD      ?
  rc            RECT <>
  rcPage        RECT <>
  chrg          CHARRANGE <>
FORMATRANGE ends

PARAFORMAT struct
  cbSize            DWORD     ?
  dwMask            DWORD     ?
  wNumbering        WORD      ?
  wEffects          WORD      ?
  dxStartIndent     DWORD     ?
  dxRightIndent     DWORD     ?
  dxOffset          DWORD     ?
  wAlignment        WORD      ?
  cTabCount         WORD      ?
  rgxTabs           DWORD MAX_TAB_STOPS dup(?)
PARAFORMAT ends

PARAFORMAT2 struct
  cbSize            DWORD    ?
  dwMask            DWORD    ?
  wNumbering        WORD     ?
  wEffects          WORD     ?
  dxStartIndent     DWORD    ?
  dxRightIndent     DWORD    ?
  dxOffset          DWORD    ?
  wAlignment        WORD     ?
  cTabCount         WORD     ?
  rgxTabs           DWORD MAX_TAB_STOPS dup(?)
  dySpaceBefore     DWORD    ?
  dySpaceAfter      DWORD    ?
  dyLineSpacing     DWORD    ?
  sStyle            WORD     ?
  bLineSpacingRule  BYTE     ?
  bOutlineLevel     BYTE     ?
  wShadingWeight    WORD     ?
  wShadingStyle     WORD     ?
  wNumberingStart   WORD     ?
  wNumberingStyle   WORD     ?
  wNumberingTab     WORD     ?
  wBorderSpace      WORD     ?
  wBorderWidth      WORD     ?
  wBorders          WORD     ?
PARAFORMAT2 ends

MSGFILTER struct
  nmhdr     NMHDR <>
  msg       DWORD      ?
  wParam    DWORD      ?
  lParam    DWORD      ?
MSGFILTER ends

REQRESIZE struct
  nmhdr  NMHDR <>
  rc     RECT <>
REQRESIZE ends

SELCHANGE struct
  nmhdr     NMHDR <>
  chrg      CHARRANGE <>
  seltyp    WORD      ?
SELCHANGE ends

ENDROPFILES struct
  nmhdr         NMHDR <>
  hDrop         DWORD      ?
  cp            DWORD      ?
  fProtected    DWORD      ?
ENDROPFILES ends

ENPROTECTED struct
  nmhdr     NMHDR <>
  msg       DWORD      ?
  wPad1     DWORD ?
  wParam    DWORD      ?
  wPad2     DWORD ?
  lParam    DWORD      ?
  chrg      CHARRANGE <>
ENPROTECTED ends

ENSAVECLIPBOARD struct
  nmhdr         NMHDR <>
  cObjectCount  DWORD      ?
  cch           DWORD      ?
ENSAVECLIPBOARD ends

ENOLEOPFAILED struct
  nmhdr     NMHDR <>
  iob       DWORD      ?
  lOper     DWORD      ?
  hr        DWORD      ?
ENOLEOPFAILED ends

ENCORRECTTEXT struct
  nmhdr     NMHDR <>
  chrg      CHARRANGE <>
  seltyp    WORD      ?
ENCORRECTTEXT ends

PUNCTUATION struct
  iSize         DWORD      ?
  szPunctuation DWORD      ?
PUNCTUATION ends

COMPCOLOR struct
  crText        DWORD      ?
  crBackground  DWORD      ?
  dwEffects     DWORD      ?
COMPCOLOR ends

REPASTESPECIAL struct
  dwAspect  DWORD      ?
  dwParam   DWORD      ?
REPASTESPECIAL ends

BIDIOPTIONS struct
  cdSize     DWORD    ?
  wMask      WORD     ?
  wEffects   WORD     ?
BIDIOPTIONS ends

;========================[ RichEdit v3 by Ewayne '==============================

CFM_BACKCOLOR           = 4000000h
CFM_LCID                = 2000000h
CFM_UNDERLINETYPE       = 800000h
CFM_WEIGHT              = 400000h
CFM_SPACING             = 200000h
CFM_KERNING             = 100000h
CFM_STYLE               = 80000h
CFM_ANIMATION           = 40000h
CFM_REVAUTHOR           = 8000h
CFM_SMALLCAPS           = 40h
CFM_ALLCAPS             = 80h
CFM_HIDDEN              = 100h
CFM_OUTLINE             = 200h
CFM_SHADOW              = 400h
CFM_EMBOSS              = 800h
CFM_IMPRINT             = 1000h
CFM_DISABLED            = 2000h
CFM_REVISED             = 4000h
SCF_DEFAULT             = 0
SCF_ALL                 = 4
SCF_SCF_USEUIRULES      = 8
CFU_CF1UNDERLINE        = 0ffh
CFU_INVERT              = 0feh
CFU_UNDERLINEHAIRLINE   = 10
CFU_UNDERLINETHICK      = 9
CFU_UNDERLINEWAVE       = 8
CFU_UNDERLINEDASHDOTDOT = 7
CFU_UNDERLINEDASHDOT    = 6
CFU_UNDERLINEDASH       = 5
CFU_UNDERLINEDOTTED     = 4
CFU_UNDERLINEDOUBLE     = 3
CFU_UNDERLINEWORD       = 2
CFU_UNDERLINE           = 1
CFU_UNDERLINENONE       = 0

PFM_SPACEBEFORE         = 40h
PFM_SPACEAFTER          = 80h
PFM_LINESPACING         = 100h
PFM_STYLE               = 400h
PFM_BORDER              = 800h
PFM_SHADING             = 1000h
PFM_NUMBERINGSTYLE      = 2000h
PFM_NUMBERINGTAB        = 4000h
PFM_NUMBERINGSTART      = 8000h
PFM_RTLPARA             = 10000h
PFM_KEEP                = 20000h
PFM_KEEPNEXT            = 40000h
PFM_PAGEBREAKBEFORE     = 80000h
PFM_NOLINENUMBER        = 100000h
PFM_NOWIDOWCONTROL      = 200000h
PFM_DONOTHYPHEN         = 400000h
PFM_SIDEBYSIDE          = 800000h
PFM_TABLE               = 40000000h
PFM_COLLAPSED           = 1000000h
PFM_OUTLINELEVEL        = 2000000h
PFM_BOX                 = 4000000h

IMECOMPTEXT struct
  cb                      DWORD ?
  flags                   DWORD ?
IMECOMPTEXT ends

CHARFORMAT2 struct
   cbSize           DWORD ?
   dwMask           DWORD ?
   dwEffects        DWORD ?
   yHeight          DWORD ?
   yOffset          DWORD ?
   crTextColor      DWORD ?
   bCharSet         BYTE ?
   bPitchAndFamily  BYTE ?
   szFaceName       TCHAR LF_FACESIZE dup (?)
   wWeight          WORD ?
   sSpacing         WORD ?
   crBackColor      DWORD ?
   lcid             LCID ?
   dwReserved       DWORD ?
   sStyle           WORD ?
   wKerning         WORD ?
   bUnderlineType   BYTE ?
   bAnimation       BYTE ?
   bRevAuthor       BYTE ?
   bReserved1       BYTE ?
CHARFORMAT2 ends

OBJECTPOSITIONS struct
   nmhdr                  NMHDR <>
   cObjectCount           DWORD ?
   pcpPositions           DWORD ?
OBJECTPOSITIONS ends

ENLINK struct
   nmhdr                  NMHDR <>
   msg                    DWORD ?
   wParam                 DWORD ?
   lParam                 DWORD ?
   chrg                   CHARRANGE <>
ENLINK ends

;============================[ RICHEDIT.H ]=======================
GETTEXTEX struct
  cb             DWORD      ? ;DWORD
  flags          DWORD      ? ;DWORD
  codepage       DWORD      ? ;UINT
  lpDefaultChar  DWORD      ? ;LPCSTR
  lpUsedDefChar  DWORD      ? ;LPBOOL
GETTEXTEX ends

SETTEXTEX struct
  flags          DWORD      ?
  codepage       DWORD      ?
SETTEXTEX ends

GETTEXTLENGTHEX struct
  flags          DWORD      ?
  codepage       DWORD      ?
GETTEXTLENGTHEX ends

ST_DEFAULT           =    0
ST_KEEPUNDO          =    1
ST_SELECTION         =    2

; ----------------------
; edit control messages
; ----------------------
EM_GETSEL                            = 0B0h
EM_SETSEL                            = 0B1h
EM_GETRECT                           = 0B2h
EM_SETRECT                           = 0B3h
EM_SETRECTNP                         = 0B4h
EM_SCROLL                            = 0B5h
EM_LINESCROLL                        = 0B6h
EM_SCROLLCARET                       = 0B7h
EM_GETMODIFY                         = 0B8h
EM_SETMODIFY                         = 0B9h
EM_GETLINECOUNT                      = 0BAh
EM_LINEINDEX                         = 0BBh
EM_SETHANDLE                         = 0BCh
EM_GETHANDLE                         = 0BDh
EM_GETTHUMB                          = 0BEh
EM_LINELENGTH                        = 0C1h
EM_REPLACESEL                        = 0C2h
EM_GETLINE                           = 0C4h
EM_LIMITTEXT                         = 0C5h
EM_CANUNDO                           = 0C6h
EM_UNDO                              = 0C7h
EM_FMTLINES                          = 0C8h
EM_LINEFROMCHAR                      = 0C9h
EM_SETTABSTOPS                       = 0CBh
EM_SETPASSWORDCHAR                   = 0CCh
EM_EMPTYUNDOBUFFER                   = 0CDh
EM_GETFIRSTVISIBLELINE               = 0CEh
EM_SETREADONLY                       = 0CFh
EM_SETWORDBREAKPROC                  = 0D0h
EM_GETWORDBREAKPROC                  = 0D1h
EM_GETPASSWORDCHAR                   = 0D2h
EM_SETMARGINS                        = 0D3h
EM_GETMARGINS                        = 0D4h
EM_SETLIMITTEXT                      = EM_LIMITTEXT
EM_GETLIMITTEXT                      = 0D5h
EM_POSFROMCHAR                       = 0D6h
EM_CHARFROMPOS                       = 0D7h
EM_SETIMESTATUS                      = 0D8h
EM_GETIMESTATUS                      = 0D9h

; -------------------------- riched equates -------------------------------

cchTextLimitDefault         = 32767

EM_CANPASTE                 = WM_USER + 50
EM_DISPLAYBAND              = WM_USER + 51
EM_EXGETSEL                 = WM_USER + 52
EM_EXLIMITTEXT              = WM_USER + 53
EM_EXLINEFROMCHAR           = WM_USER + 54
EM_EXSETSEL                 = WM_USER + 55
EM_FINDTEXTA                = WM_USER + 56
EM_FINDTEXTW                = WM_USER + 123
if UNICODE eq TRUE
    EM_FINDTEXT = EM_FINDTEXTW
else
    EM_FINDTEXT = EM_FINDTEXTA
end if

EM_FORMATRANGE              = WM_USER + 57
EM_GETCHARFORMAT            = WM_USER + 58
EM_GETEVENTMASK             = WM_USER + 59
EM_GETOLEINTERFACE          = WM_USER + 60
EM_GETPARAFORMAT            = WM_USER + 61
EM_GETSELTEXT               = WM_USER + 62
EM_HIDESELECTION            = WM_USER + 63
EM_PASTESPECIAL             = WM_USER + 64
EM_REQUESTRESIZE            = WM_USER + 65
EM_SELECTIONTYPE            = WM_USER + 66
EM_SETBKGNDCOLOR            = WM_USER + 67
EM_SETCHARFORMAT            = WM_USER + 68
EM_SETEVENTMASK             = WM_USER + 69
EM_SETOLECALLBACK           = WM_USER + 70
EM_SETPARAFORMAT            = WM_USER + 71
EM_SETTARGETDEVICE          = WM_USER + 72
EM_STREAMIN                 = WM_USER + 73
EM_STREAMOUT                = WM_USER + 74
EM_GETTEXTRANGE             = WM_USER + 75
EM_FINDWORDBREAK            = WM_USER + 76
EM_SETOPTIONS               = WM_USER + 77
EM_GETOPTIONS               = WM_USER + 78
EM_FINDTEXTEXA              = WM_USER + 79
EM_FINDTEXTEXW              = WM_USER + 124
if UNICODE eq TRUE
    EM_FINDTEXTEX = EM_FINDTEXTEXW
else
    EM_FINDTEXTEX = EM_FINDTEXTEXA
end if

EM_GETWORDBREAKPROCEX       = WM_USER + 80
EM_SETWORDBREAKPROCEX       = WM_USER + 81
EM_SETUNDOLIMIT             = WM_USER + 82
EM_REDO                     = WM_USER + 84
EM_CANREDO                  = WM_USER + 85
EM_GETUNDONAME              = WM_USER + 86
EM_GETREDONAME              = WM_USER + 87
EM_STOPGROUPTYPING          = WM_USER + 88
EM_SETTEXTMODE              = WM_USER + 89
EM_GETTEXTMODE              = WM_USER + 90
EM_AUTOURLDETECT            = WM_USER + 91
EM_GETAUTOURLDETECT         = WM_USER + 92
EM_SETPALETTE               = WM_USER + 93
EM_GETTEXTEX                = WM_USER + 94
EM_GETTEXTLENGTHEX          = WM_USER + 95
EM_SHOWSCROLLBAR            = WM_USER + 96

EM_SETPUNCTUATION           = WM_USER + 100
EM_GETPUNCTUATION           = WM_USER + 101
EM_SETWORDWRAPMODE          = WM_USER + 102
EM_GETWORDWRAPMODE          = WM_USER + 103
EM_SETIMECOLOR              = WM_USER + 104
EM_GETIMECOLOR              = WM_USER + 105
EM_SETIMEOPTIONS            = WM_USER + 106
EM_GETIMEOPTIONS            = WM_USER + 107
EM_CONVPOSITION             = WM_USER + 108
EM_SETLANGOPTIONS           = WM_USER + 120
EM_GETLANGOPTIONS           = WM_USER + 121
EM_GETIMECOMPMODE           = WM_USER + 122
EM_RECONVERSION             = WM_USER + 125
EM_SETIMEMODEBIAS           = WM_USER + 126
EM_GETIMEMODEBIAS           = WM_USER + 127
EM_SETBIDIOPTIONS           = WM_USER + 200
EM_GETBIDIOPTIONS           = WM_USER + 201
EM_SETTYPOGRAPHYOPTIONS     = WM_USER + 202
EM_GETTYPOGRAPHYOPTIONS     = WM_USER + 203
EM_SETEDITSTYLE             = WM_USER + 204
EM_GETEDITSTYLE             = WM_USER + 205

EM_OUTLINE                  = WM_USER + 220
EM_GETSCROLLPOS             = WM_USER + 221
EM_SETSCROLLPOS             = WM_USER + 222
EM_SETFONTSIZE              = WM_USER + 223
EM_GETZOOM                  = WM_USER + 224
EM_SETZOOM                  = WM_USER + 225

EM_SETTEXTEX                = WM_USER + 97

; ----------------------
; notification messages
; ----------------------
EN_SETFOCUS                 = 100h
EN_KILLFOCUS                = 200h
EN_CHANGE                   = 300h
EN_UPDATE                   = 400h
EN_ERRSPACE                 = 500h
EN_MAXTEXT                  = 501h
EN_HSCROLL                  = 601h
EN_VSCROLL                  = 602h

EN_MSGFILTER                = 0700h
EN_REQUESTRESIZE            = 0701h
EN_SELCHANGE                = 0702h
EN_DROPFILES                = 0703h
EN_PROTECTED                = 0704h
EN_CORRECTTEXT              = 0705h
EN_STOPNOUNDO               = 0706h
EN_IMECHANGE                = 0707h
EN_SAVECLIPBOARD            = 0708h
EN_OLEOPFAILED              = 0709h

; ***************** additional equates from server 2003 *******************

SES_NOIME                        = 128
SES_UPPERCASE                    = 512
SES_LOWERCASE                    = 1024
SES_NOINPUTSEQUENCECHK           = 2048
SES_BIDI                         = 4096
SES_SCROLLONKILLFOCUS            = 8192
SES_XLTCRCRLFTOCR                = 16384
SES_DRAFTMODE                    = 32768
SES_USECTF                       = 0010000h
SES_HIDEGRIDLINES                = 0020000h
SES_USEATFONT                    = 0040000h
SES_CUSTOMLOOK                   = 0080000h
SES_LBSCROLLNOTIFY               = 0100000h
SES_CTFALLOWEMBED                = 0200000h
SES_CTFALLOWSMARTTAG             = 0400000h
SES_CTFALLOWPROOFING             = 0800000h
IMF_AUTOKEYBOARD                 = 0001h
IMF_AUTOFONT                     = 0002h
IMF_IMECANCELCOMPLETE            = 0004h
IMF_IMEALWAYSSENDNOTIFY          = 0008h
IMF_AUTOFONTSIZEADJUST           = 0010h
IMF_UIFONTS                      = 0020h
IMF_DUALFONT                     = 0080h
ICM_NOTOPEN                      = 0000h
ICM_LEVEL3                       = 0001h
ICM_LEVEL2                       = 0002h
ICM_LEVEL2_5                     = 0003h
ICM_LEVEL2_SUI                   = 0004h
ICM_CTF                          = 0005h
TO_DISABLECUSTOMTEXTOUT          = 4
TO_ADVANCEDLAYOUT                = 8
EM_GETVIEWKIND                   = (WM_USER + 226)
EM_SETVIEWKIND                   = (WM_USER + 227)
EM_GETPAGE                       = (WM_USER + 228)
EM_SETPAGE                       = (WM_USER + 229)
EM_GETHYPHENATEINFO              = (WM_USER + 230)
EM_SETHYPHENATEINFO              = (WM_USER + 231)
EM_GETPAGEROTATE                 = (WM_USER + 235)
EM_SETPAGEROTATE                 = (WM_USER + 236)
EM_GETCTFMODEBIAS                = (WM_USER + 237)
EM_SETCTFMODEBIAS                = (WM_USER + 238)
EM_GETCTFOPENSTATUS              = (WM_USER + 240)
EM_SETCTFOPENSTATUS              = (WM_USER + 241)
EM_GETIMECOMPTEXT                = (WM_USER + 242)
EM_ISIME                         = (WM_USER + 243)
EM_GETIMEPROPERTY                = (WM_USER + 244)
EPR_0                            = 0
EPR_270                          = 1
EPR_180                          = 2
EPR_90                           = 3
CTFMODEBIAS_DEFAULT              = 0000h
CTFMODEBIAS_FILENAME             = 0001h
CTFMODEBIAS_NAME                 = 0002h
CTFMODEBIAS_READING              = 0003h
CTFMODEBIAS_DATETIME             = 0004h
CTFMODEBIAS_CONVERSATION         = 0005h
CTFMODEBIAS_NUMERIC              = 0006h
CTFMODEBIAS_HIRAGANA             = 0007h
CTFMODEBIAS_KATAKANA             = 0008h
CTFMODEBIAS_HANGUL               = 0009h
CTFMODEBIAS_HALFWIDTHKATAKANA    = 000Ah
CTFMODEBIAS_FULLWIDTHALPHANUMERIC = 000Bh
CTFMODEBIAS_HALFWIDTHALPHANUMERIC = 000Ch
IMF_SMODE_PLAURALCLAUSE          = 0001h
IMF_SMODE_NONE                   = 0002h
ICT_RESULTREADSTR                = 1
EMO_EXIT                         = 0
EMO_ENTER                        = 1
EMO_PROMOTE                      = 2
EMO_EXPAND                       = 3
EMO_MOVESELECTION                = 4
EMO_GETVIEWMODE                  = 5
EMO_EXPANDSELECTION              = 0
EMO_EXPANDDOCUMENT               = 1
VM_NORMAL                        = 4
VM_OUTLINE                       = 2
VM_PAGE                          = 9
EN_OBJECTPOSITIONS               = 070ah
EN_DRAGDROPDONE                  = 070ch
EN_PARAGRAPHEXPANDED             = 070dh
EN_PAGECHANGE                    = 070eh
EN_LOWFIRTF                      = 070fh
EN_ALIGNLTR                      = 0710h
EN_ALIGNRTL                      = 0711h
ENM_SCROLLEVENTS                 = 00000008h
ENM_DRAGDROPDONE                 = 00000010h
ENM_PARAGRAPHEXPANDED            = 00000020h
ENM_PAGECHANGE                   = 00000040h
ENM_LANGCHANGE                   = 01000000h
ENM_OBJECTPOSITIONS              = 02000000h
ENM_LINK                         = 04000000h
ENM_LOWFIRTF                     = 08000000h
ES_NOOLEDRAGDROP                 = 00000008h
IMF_MULTIPLEEDIT                 = 0400h
CFM_LINK                         = 00000020h
CFE_LINK                         = 0020h
CFE_SUBSCRIPT                    = 00010000h
CFE_SUPERSCRIPT                  = 00020000h
CFM_SUBSCRIPT                    = CFE_SUBSCRIPT or CFE_SUPERSCRIPT
CFM_SUPERSCRIPT                  = CFM_SUBSCRIPT
CFE_SMALLCAPS                    = CFM_SMALLCAPS
CFE_ALLCAPS                      = CFM_ALLCAPS
CFE_HIDDEN                       = CFM_HIDDEN
CFE_OUTLINE                      = CFM_OUTLINE
CFE_SHADOW                       = CFM_SHADOW
CFE_EMBOSS                       = CFM_EMBOSS
CFE_IMPRINT                      = CFM_IMPRINT
CFE_DISABLED                     = CFM_DISABLED
CFE_REVISED                      = CFM_REVISED
CFE_AUTOBACKCOLOR                = CFM_BACKCOLOR
CFU_UNDERLINETHICKLONGDASH       = 18
CFU_UNDERLINETHICKDOTTED         = 17
CFU_UNDERLINETHICKDASHDOTDOT     = 16
CFU_UNDERLINETHICKDASHDOT        = 15
CFU_UNDERLINETHICKDASH           = 14
CFU_UNDERLINELONGDASH            = 13
CFU_UNDERLINEHEAVYWAVE           = 12
CFU_UNDERLINEDOUBLEWAVE          = 11
SCF_ASSOCIATEFONT                = 0010h
SCF_NOKBUPDATE                   = 0020h
SCF_ASSOCIATEFONT2               = 0040h
SF_UNICODE                       = 0010h
SF_USECODEPAGE                   = 0020h
SF_NCRFORNONASCII                = 40h
SFF_WRITEXTRAPAR                 = 80h
SFF_PERSISTVIEWSCALE             = 2000h
SFF_KEEPDOCINFO                  = 1000h
SFF_PWD                          = 0800h
SF_RTFVAL                        = 0700h
MAX_TABLE_CELLS                  = 63
PFM_TEXTWRAPPINGBREAK            = 20000000h
PFM_TABLEROWDELIMITER            = 10000000h
PFM_RESERVED2                    = 08000000h
PFN_ARABIC                       = 2
PFN_LCLETTER                     = 3
PFN_UCLETTER                     = 4
PFN_LCROMAN                      = 5
PFN_UCROMAN                      = 6
PFNS_PAREN                       = 000h
PFNS_PARENS                      = 100h
PFNS_PERIOD                      = 200h
PFNS_PLAIN                       = 300h
PFNS_NONUMBER                    = 400h
PFNS_NEWNUMBER                   = 8000h
PFA_JUSTIFY                      = 4
PFA_FULL_INTERWORD               = 4
PFA_FULL_INTERLETTER             = 5
PFA_FULL_SCALED                  = 6
PFA_FULL_GLYPHS                  = 7
PFA_SNAP_GRID                    = 8
GCM_RIGHTMOUSEDROP               = 8000h
ST_NEWCHARS                      = 4
GT_SELECTION                     = 2
GT_RAWTEXT                       = 4
GT_NOHIDDENTEXT                  = 8
BOM_DEFPARADIR                   = 0001h
BOM_PLAINTEXT                    = 0002h
BOM_NEUTRALOVERRIDE              = 0004h
BOM_CONTEXTREADING               = 0008h
BOM_CONTEXTALIGNMENT             = 0010h
BOE_RTLDIR                       = 0001h
BOE_PLAINTEXT                    = 0002h
BOE_NEUTRALOVERRIDE              = 0004h
BOE_CONTEXTREADING               = 0008h
BOE_CONTEXTALIGNMENT             = 0010h
FR_MATCHDIAC                     = 20000000h
FR_MATCHKASHIDA                  = 40000000h
FR_MATCHALEFHAMZA                = 80000000h
WCH_EMBEDDING                    = 0FFFCh

;;;; end riched

;;;; ole

;OLE Structures and Equates
;----------------------------------------------------------------------------

CLSCTX_ALL              = CLSCTX_INPROC_SERVER or CLSCTX_INPROC_HANDLER or CLSCTX_LOCAL_SERVER
CLSCTX_INPROC           = CLSCTX_INPROC_SERVER or CLSCTX_INPROC_HANDLER
CLSCTX_SERVER           =  CLSCTX_INPROC_SERVER or CLSCTX_LOCAL_SERVER

REGCLS_SINGLEUSE        = 0
REGCLS_MULTIPLEUSE      = 1
REGCLS_MULTI_SEPARATE   = 2

MARSHALINTERFACE_MIN    = 500
CWCSTORAGENAME          = 32
STGM_DIRECT             = 0
STGM_TRANSACTED         = 00010000h
STGM_SIMPLE             = 08000000h
STGM_READ               = 0
STGM_WRITE              = 00000001h
STGM_READWRITE          = 00000002h
STGM_SHARE_DENY_NONE    = 00000040h
STGM_SHARE_DENY_READ    = 00000030h
STGM_SHARE_DENY_WRITE   = 00000020h
STGM_SHARE_EXCLUSIVE    = 00000010h
STGM_PRIORITY           = 00040000h
STGM_DELETEONRELEASE    = 04000000h
STGM_CREATE             = 00001000h
STGM_CONVERT            = 00020000h
STGM_FAILIFTHERE        = 0

 ; IID   struct DWORD
 ;     Data1        dd ?
 ;     Data2        dw ?
 ;     Data3        dw ?
 ;     Data4        db 8 dup(?)
 ; IID ends

BFFM_SETSTATUSTEXTA     =  WM_USER + 100
BFFM_SETSTATUSTEXTW     = (WM_USER + 104)
if UNICODE eq TRUE
    BFFM_SETSTATUSTEXT = BFFM_SETSTATUSTEXTW
else
    BFFM_SETSTATUSTEXT = BFFM_SETSTATUSTEXTA
end if

BFFM_SETSELECTIONA      =  WM_USER + 102
BFFM_SETSELECTIONW      = (WM_USER + 103)
if UNICODE eq TRUE
    BFFM_SETSELECTION = BFFM_SETSELECTIONW
else
    BFFM_SETSELECTION = BFFM_SETSELECTIONA
end if

;CMIC_VALID_SEE_FLAGS    =  SEE_VALID_CMIC_FLAGS     ; Internal

COLORSCHEME struct
   dwSize dd ?
   clrBtnHighlight COLORREF ?
   clrBtnShadow COLORREF ?
COLORSCHEME ends

NMMOUSE struct
    hdr NMHDR <>
    dwItemSpec dd ?
    dwItemData dd ?
    pt POINT <>
    dwHitInfo dd ?
NMMOUSE ends
TYPEDEF NMCLICK, NMMOUSE

HOVER_DEFAULT   = 0FFFFFFFFh

TRACKMOUSEEVENT struct
    cbSize dd ?
    dwFlags dd ?
    hwndTrack dd ?
    dwHoverTime dd ?
TRACKMOUSEEVENT ends

TBSTYLE_AUTOSIZE = 10h
TB_SETCOLORSCHEME     =  CCM_SETCOLORSCHEME
SWP_NOSENDCHANGING  = 400h
CC_ANYCOLOR              = 100h
TCN_FOCUSCHANGE        = TCN_FIRST - 4

STREAM_SEEK_SET =  0
STREAM_SEEK_CUR = 1
STREAM_SEEK_END =  2

GTL_DEFAULT  = 0
GTL_USECRLF  = 1
GTL_PRECISE = 2
GTL_CLOSE = 4
GTL_NUMCHARS = 8
GTL_NUMBYTES = 16

TM_PLAINTEXT            = 1
TM_RICHTEXT             = 2
TM_SINGLELEVELUNDO      = 4
TM_MULTILEVELUNDO       = 8
TM_SINGLECODEPAGE       = 16
TM_MULTICODEPAGE        = 32

TO_ADVANCEDTYPOGRAPHY =   1
TO_SIMPLELINEBREAK  = 2
TCS_FLATBUTTONS         = 8

TTF_DI_SETITEM          = 8000h
RBBS_USECHEVRON     = 200h
GT_DEFAULT  = 0
GT_USECRLF  = 1

DLLVERSIONINFO struct
        cbSize dd ?
        dwMajorVersion dd ?
        dwMinorVersion dd ?
        dwBuildNumber dd ?
        dwPlatformID dd ?
DLLVERSIONINFO ends

BTNS_SHOWTEXT   = 40h
I_IMAGENONE = -2

DTM_FIRST   = 1000h
DTM_SETFORMAT = DTM_FIRST + 5
DTM_SETSYSTEMTIME   = DTM_FIRST + 2
DTM_GETSYSTEMTIME   = DTM_FIRST + 1
MAX_COMPUTERNAME_LENGTH = 15

;;;; end ole

;;;; gdiplus

; Translation by Alonso Murillo,
; revised by qWord, 2011

; TYPEDEF ARGB, DWORD

GdiplusStartupInput struct
    GdiplusVersion              DWORD ?
    DebugEventCallback          DWORD ?
    SuppressBackgroundThread    DWORD ?
    SuppressExternalCodecs      DWORD ?
GdiplusStartupInput ends

PointF struct
    x REAL4 ?
    y REAL4 ?
PointF ends

RectF struct
    x       REAL4 ?
    y       REAL4 ?
    _Width  REAL4 ?
    Height  REAL4 ?
RectF ends

SizeF struct
    _Width REAL4 ?
    Height REAL4 ?
SizeF ends

AlphaShift  = 24
RedShift    = 16
GreenShift  = 8
BlueShift   = 0
AlphaMask   = 0FF000000h
RedMask     = 000FF0000h
GreenMask   = 00000FF00h
BlueMask    = 0000000FFh

ImageLockModeRead               = 1
ImageLockModeWrite              = 2
ImageLockModeReadWrite          = 3
ImageLockModeUserInputBuf       = 4

PixelFormat1bppIndexed          = 30101h
PixelFormat4bppIndexed          = 30402h
PixelFormat8bppIndexed          = 30803h
PixelFormat16bppGreyScale       = 101004h
PixelFormat16bppRGB555          = 21005h
PixelFormat16bppRGB565          = 21006h
PixelFormat16bppARGB1555        = 61007h
PixelFormat24bppRGB             = 21808h
PixelFormat32bppRGB             = 22009
PixelFormat32bppARGB            = 26200Ah
PixelFormat32bppPARGB           = 0E200Bh
PixelFormat48bppRGB             = 10300Ch
PixelFormat64bppARGB            = 34400Dh
PixelFormat64bppPARGB           = 1C400Eh
PixelFormatMax                  = 0fh

PropertyTagTypeByte         = 1
PropertyTagTypeASCII        = 2
PropertyTagTypeShort        = 3
PropertyTagTypeLong         = 4
PropertyTagTypeRational     = 5
PropertyTagTypeUndefined    = 7
PropertyTagTypeSLONG        = 9
PropertyTagTypeSRational    = 10


PropertyTagExifIFD  = 8769h
PropertyTagGpsIFD   = 8825h

PropertyTagNewSubfileType       = 0FEh
PropertyTagSubfileType          = 0FFh
PropertyTagImageWidth           = 100h
PropertyTagImageHeight          = 101h
PropertyTagBitsPerSample        = 102h
PropertyTagCompression          = 103h
PropertyTagPhotometricInterp    = 106h
PropertyTagThreshHolding        = 107h
PropertyTagCellWidth            = 108h
PropertyTagCellHeight           = 109h
PropertyTagFillOrder            = 10Ah
PropertyTagDocumentName         = 10Dh
PropertyTagImageDescription     = 10Eh
PropertyTagEquipMake            = 10Fh
PropertyTagEquipModel           = 110h
PropertyTagStripOffsets         = 111h
PropertyTagOrientation          = 112h
PropertyTagSamplesPerPixel      = 115h
PropertyTagRowsPerStrip         = 116h
PropertyTagStripBytesCount      = 117h
PropertyTagMinSampleValue       = 118h
PropertyTagMaxSampleValue       = 119h
PropertyTagXResolution          = 11Ah
PropertyTagYResolution          = 11Bh
PropertyTagPlanarConfig         = 11Ch
PropertyTagPageName             = 11Dh
PropertyTagXPosition            = 11Eh
PropertyTagYPosition            = 11Fh
PropertyTagFreeOffset           = 120h
PropertyTagFreeByteCounts       = 121h
PropertyTagGrayResponseUnit     = 122h
PropertyTagGrayResponseCurve    = 123h
PropertyTagT4Option             = 124h
PropertyTagT6Option             = 125h
PropertyTagResolutionUnit       = 128h
PropertyTagPageNumber           = 129h
PropertyTagTransferFuncition    = 12Dh
PropertyTagSoftwareUsed         = 131h
PropertyTagDateTime             = 132h
PropertyTagArtist               = 13Bh
PropertyTagHostComputer         = 13Ch
PropertyTagPredictor            = 13Dh
PropertyTagWhitePoint           = 13Eh
PropertyTagPrimaryChromaticities    = 13Fh
PropertyTagColorMap             = 140h
PropertyTagHalftoneHints        = 141h
PropertyTagTileWidth            = 142h
PropertyTagTileLength           = 143h
PropertyTagTileOffset           = 144h
PropertyTagTileByteCounts       = 145h
PropertyTagInkSet               = 14Ch
PropertyTagInkNames             = 14Dh
PropertyTagNumberOfInks         = 14Eh
PropertyTagDotRange             = 150h
PropertyTagTargetPrinter        = 151h
PropertyTagExtraSamples         = 152h
PropertyTagSampleFormat         = 153h
PropertyTagSMinSampleValue      = 154h
PropertyTagSMaxSampleValue      = 155h
PropertyTagTransferRange        = 156h

PropertyTagJPEGProc                 = 200h
PropertyTagJPEGInterFormat          = 201h
PropertyTagJPEGInterLength          = 202h
PropertyTagJPEGRestartInterval      = 203h
PropertyTagJPEGLosslessPredictors   = 205h
PropertyTagJPEGPointTransforms      = 206h
PropertyTagJPEGQTables              = 207h
PropertyTagJPEGDCTables             = 208h
PropertyTagJPEGACTables             = 209h
PropertyTagYCbCrCoefficients        = 211h
PropertyTagYCbCrSubsampling         = 212h
PropertyTagYCbCrPositioning         = 213h
PropertyTagREFBlackWhite            = 214h
PropertyTagICCProfile               = 8773h
PropertyTagGamma                    = 301h
PropertyTagICCProfileDescriptor     = 302h
PropertyTagSRGBRenderingIntent      = 303h
PropertyTagImageTitle               = 320h
PropertyTagCopyright                = 8298h


PropertyTagResolutionXUnit              = 5001h
PropertyTagResolutionYUnit              = 5002h
PropertyTagResolutionXLengthUnit        = 5003h
PropertyTagResolutionYLengthUnit        = 5004h
PropertyTagPrintFlags                   = 5005h
PropertyTagPrintFlagsVersion            = 5006h
PropertyTagPrintFlagsCrop               = 5007h
PropertyTagPrintFlagsBleedWidth         = 5008h
PropertyTagPrintFlagsBleedWidthScale    = 5009h
PropertyTagHalftoneLPI                  = 500Ah
PropertyTagHalftoneLPIUnit              = 500Bh
PropertyTagHalftoneDegree               = 500Ch
PropertyTagHalftoneShape                = 500Dh
PropertyTagHalftoneMisc                 = 500Eh
PropertyTagHalftoneScreen               = 500Fh
PropertyTagJPEGQuality                  = 5010h
PropertyTagGridSize                     = 5011h
PropertyTagThumbnailFormat              = 5012h
PropertyTagThumbnailWidth               = 5013h
PropertyTagThumbnailHeight              = 5014h
PropertyTagThumbnailColorDepth          = 5015h
PropertyTagThumbnailPlanes              = 5016h
PropertyTagThumbnailRawBytes            = 5017h
PropertyTagThumbnailSize                = 5018h
PropertyTagThumbnailCompressedSize      = 5019h
PropertyTagColorTransferFunction        = 501Ah
PropertyTagThumbnailData                = 501Bh


PropertyTagThumbnailImageWidth          = 5020h
PropertyTagThumbnailImageHeight         = 5021h
PropertyTagThumbnailBitsPerSample       = 5022h
PropertyTagThumbnailCompression         = 5023h
PropertyTagThumbnailPhotometricInterp   = 5024h
PropertyTagThumbnailImageDescription    = 5025h
PropertyTagThumbnailEquipMake           = 5026h

PropertyTagThumbnailEquipModel              = 5027h
PropertyTagThumbnailStripOffsets            = 5028h
PropertyTagThumbnailOrientation             = 5029h
PropertyTagThumbnailSamplesPerPixel         = 502Ah
PropertyTagThumbnailRowsPerStrip            = 502Bh
PropertyTagThumbnailStripBytesCount         = 502Ch
PropertyTagThumbnailResolutionX             = 502Dh
PropertyTagThumbnailResolutionY             = 502Eh
PropertyTagThumbnailPlanarConfig            = 502Fh
PropertyTagThumbnailResolutionUnit          = 5030h
PropertyTagThumbnailTransferFunction        = 5031h
PropertyTagThumbnailSoftwareUsed            = 5032h
PropertyTagThumbnailDateTime                = 5033h
PropertyTagThumbnailArtist                  = 5034h
PropertyTagThumbnailWhitePoint              = 5035h
PropertyTagThumbnailPrimaryChromaticities   = 5036h
PropertyTagThumbnailYCbCrCoefficients       = 5037h
PropertyTagThumbnailYCbCrSubsampling        = 5038h
PropertyTagThumbnailYCbCrPositioning        = 5039h
PropertyTagThumbnailRefBlackWhite           = 503Ah
PropertyTagThumbnailCopyRight               = 503Bh
PropertyTagLuminanceTable                   = 5090h
PropertyTagChrominanceTable                 = 5091h
PropertyTagFrameDelay                       = 5100h
PropertyTagLoopCount                        = 5101h
PropertyTagPixelUnit                        = 5110h
PropertyTagPixelPerUnitX                    = 5111h
PropertyTagPixelPerUnitY                    = 5112h
PropertyTagPaletteHistogram                 = 5113h

PropertyTagExifExposureTime     = 829Ah
PropertyTagExifFNumber          = 829Dh
PropertyTagExifExposureProg     = 8822h
PropertyTagExifSpectralSense    = 8824h
PropertyTagExifISOSpeed         = 8827h
PropertyTagExifOECF             = 8828h
PropertyTagExifVer              = 9000h
PropertyTagExifDTOrig           = 9003h
PropertyTagExifDTDigitized      = 9004h
PropertyTagExifCompConfig       = 9101h
PropertyTagExifCompBPP          = 9102h
PropertyTagExifShutterSpeed     = 9201h
PropertyTagExifAperture         = 9202h
PropertyTagExifBrightness       = 9203h
PropertyTagExifExposureBias     = 9204h
PropertyTagExifMaxAperture      = 9205h
PropertyTagExifSubjectDist      = 9206h
PropertyTagExifMeteringMode     = 9207h
PropertyTagExifLightSource      = 9208h
PropertyTagExifFlash            = 9209h
PropertyTagExifFocalLength      = 920Ah
PropertyTagExifMakerNote        = 927Ch
PropertyTagExifUserComment      = 9286h
PropertyTagExifDTSubsec         = 9290h
PropertyTagExifDTOrigSS         = 9291h
PropertyTagExifDTDigSS          = 9292h
PropertyTagExifFPXVer           = 0A000h
PropertyTagExifColorSpace       = 0A001h
PropertyTagExifPixXDim          = 0A002h
PropertyTagExifPixYDim          = 0A003h
PropertyTagExifRelatedWav       = 0A004h
PropertyTagExifInterop          = 0A005h
PropertyTagExifFlashEnergy      = 0A20Bh
PropertyTagExifSpatialFR        = 0A20Ch
PropertyTagExifFocalXRes        = 0A20Eh
PropertyTagExifFocalYRes        = 0A20Fh
PropertyTagExifFocalResUnit     = 0A210h
PropertyTagExifSubjectLoc       = 0A214h
PropertyTagExifExposureIndex    = 0A215h
PropertyTagExifSensingMethod    = 0A217h
PropertyTagExifFileSource       = 0A300h
PropertyTagExifSceneType        = 0A301h
PropertyTagExifCfaPattern       = 0A302h
PropertyTagGpsVer               = 0
PropertyTagGpsLatitudeRef       = 1
PropertyTagGpsLatitude          = 2
PropertyTagGpsLongitudeRef      = 3
PropertyTagGpsLongitude         = 4
PropertyTagGpsAltitudeRef       = 5
PropertyTagGpsAltitude          = 6
PropertyTagGpsGpsTime           = 7
PropertyTagGpsGpsSatellites     = 8
PropertyTagGpsGpsStatus         = 9
PropertyTagGpsGpsMeasureMode    = 0Ah
PropertyTagGpsGpsDop            = 0Bh
PropertyTagGpsSpeedRef          = 0Ch
PropertyTagGpsSpeed             = 0Dh
PropertyTagGpsTrackRef          = 0Eh
PropertyTagGpsTrack             = 0Fh
PropertyTagGpsImgDirRef         = 10h
PropertyTagGpsImgDir            = 11h
PropertyTagGpsMapDatum          = 12h
PropertyTagGpsDestLatRef        = 13h
PropertyTagGpsDestLat           = 14h
PropertyTagGpsDestLongRef       = 15h
PropertyTagGpsDestLong          = 16h
PropertyTagGpsDestBearRef       = 17h
PropertyTagGpsDestBear          = 18h
PropertyTagGpsDestDistRef       = 19h
PropertyTagGpsDestDist          = 1Ah

COLORBYTES struct
    BlueByte    BYTE ?
    GreenByte   BYTE ?
    RedByte     BYTE ?
    AlphaByte   BYTE ?
COLORBYTES ends

COLORLONG  struct
    longval DWORD ?
COLORLONG  ends

ImageCodecInfo struct
    ClassID            GUID  <>
    FormatID           GUID  <>
    CodecName          DWORD ?
    DllName            DWORD ?
    FormatDescription  DWORD ?
    FilenameExtension  DWORD ?
    MimeType           DWORD ?
    flags              DWORD ?
    Version            DWORD ?
    SigCount           DWORD ?
    SigSize            DWORD ?
    SigPattern         DWORD ?
    SigMask            DWORD ?
ImageCodecInfo ends

EncoderParameter struct
    pGUID             GUID  <>
    NumberOfValues    DWORD ?
    vType             DWORD ?
    value             DWORD ?
EncoderParameter ends

EncoderParameters struct
    Count       DWORD ?
    Parameter   EncoderParameter <>
EncoderParameters ends

ColorPalette struct
    flags   DWORD ?
    Count   DWORD ?
    Entries DWORD ?
ColorPalette ends

ColorMatrix struct
    m11 REAL4 ?
    m12 REAL4 ?
    m13 REAL4 ?
    m14 REAL4 ?
    m15 REAL4 ?
    m21 REAL4 ?
    m22 REAL4 ?
    m23 REAL4 ?
    m24 REAL4 ?
    m25 REAL4 ?
    m31 REAL4 ?
    m32 REAL4 ?
    m33 REAL4 ?
    m34 REAL4 ?
    m35 REAL4 ?
    m41 REAL4 ?
    m42 REAL4 ?
    m43 REAL4 ?
    m44 REAL4 ?
    m45 REAL4 ?
    m51 REAL4 ?
    m52 REAL4 ?
    m53 REAL4 ?
    m54 REAL4 ?
    m55 REAL4 ?
ColorMatrix ends

BitmapData struct
    nWidth      DWORD ?
    nHeight     DWORD ?
    Stride      DWORD ?
    PixelFormat DWORD ?
    Scan0       DWORD ?
    Reserved    DWORD ?
BitmapData ends

PathData struct
    Count   DWORD ?
    pPoint  DWORD ?
    types   DWORD ?
PathData ends

PropertyItem struct
    propId   DWORD ?
    _length  DWORD ?
    nType    WORD ?
    value    DWORD ?
PropertyItem ends

CharacterRange struct
    First   DWORD ?
    _length DWORD ?
CharacterRange ends

PWMFRect16 struct
    nLEFT   WORD ?
    nTop    WORD ?
    nRIGHT  WORD ?
    nBottom WORD ?
PWMFRect16 ends

WmfPlaceableFileHeader struct
    Key            DWORD ?
    Hmf            WORD  ?
    boundingBox    PWMFRect16 <>
    Inch           WORD  ?
    Reserved       DWORD ?
    Checksum       WORD  ?
WmfPlaceableFileHeader ends

ENHMETAHEADER3 struct
    itype           DWORD ?
    nSize           DWORD ?
    rclBounds       RECTL <>
    rclFrame        RECTL <>
    dSignature      DWORD ?
    nVersion        DWORD ?
    nBytes          DWORD ?
    nRecords        DWORD ?
    nHandles        WORD  ?
    sReserved       WORD  ?
    nDescription    DWORD ?
    offDescription  DWORD ?
    nPalEntries     DWORD ?
    szlDevice       SIZEL <>
    szlMillimeters  SIZEL <>
ENHMETAHEADER3 ends

MetafileHeader struct
    mType             DWORD ?
    msize             DWORD ?
    Version           DWORD ?
    EmfPlusFlags      DWORD ?
    DpiX              REAL4 ?
    DpiY              REAL4 ?
    x                 DWORD ?
    y                 DWORD ?
    nWIDTH            DWORD ?
    Height            DWORD ?
    EmfHeader         ENHMETAHEADER3 <>
    EmfPlusHeaderSize DWORD ?
    LogicalDpiX       DWORD ?
    LogicalDpiY       DWORD ?
MetafileHeader ends


UnitWorld       = 0
UnitDisplay     = 1
UnitPixel       = 2
UnitPoint       = 3
UnitInch        = 4
UnitDocument    = 5
UnitMillimeter  = 6


ColorsAliceBlue             = 0FFF0F8FFh
ColorsAntiqueWhite          = 0FFFAEBD7h
ColorsAqua                  = 0FF00FFFFh
ColorsAquamarine            = 0FF7FFFD4h
ColorsAzure                 = 0FFF0FFFFh
ColorsBeige                 = 0FFF5F5DCh
ColorsBisque                = 0FFFFE4C4h
ColorsBlack                 = 0FF000000h
ColorsBlanchedAlmond        = 0FFFFEBCDh
ColorsBlue                  = 0FF0000FFh
ColorsBlueViolet            = 0FF8A2BE2h
ColorsBrown                 = 0FFA52A2Ah
ColorsBurlyWood             = 0FFDEB887h
ColorsCadetBlue             = 0FF5F9EA0h
ColorsChartreuse            = 0FF7FFF00h
ColorsChocolate             = 0FFD2691Eh
ColorsCoral                 = 0FFFF7F50h
ColorsCornflowerBlue        = 0FF6495EDh
ColorsCornsilk              = 0FFFFF8DCh
ColorsCrimson               = 0FFDC143Ch
ColorsCyan                  = 0FF00FFFFh
ColorsDarkBlue              = 0FF00008Bh
ColorsDarkCyan              = 0FF008B8Bh
ColorsDarkGoldenrod         = 0FFB8860Bh
ColorsDarkGray              = 0FFA9A9A9h
ColorsDarkGreen             = 0FF006400h
ColorsDarkKhaki             = 0FFBDB76Bh
ColorsDarkMagenta           = 0FF8B008Bh
ColorsDarkOliveGreen        = 0FF556B2Fh
ColorsDarkOrange            = 0FFFF8C00h
ColorsDarkOrchid            = 0FF9932CCh
ColorsDarkRed               = 0FF8B0000h
ColorsDarkSalmon            = 0FFE9967Ah
ColorsDarkSeaGreen          = 0FF8FBC8Bh
ColorsDarkSlateBlue         = 0FF483D8Bh
ColorsDarkSlateGray         = 0FF2F4F4Fh
ColorsDarkTurquoise         = 0FF00CED1h
ColorsDarkViolet            = 0FF9400D3h
ColorsDeepPink              = 0FFFF1493h
ColorsDeepSkyBlue           = 0FF00BFFFh
ColorsDimGray               = 0FF696969h
ColorsDodgerBlue            = 0FF1E90FFh
ColorsFirebrick             = 0FFB22222h
ColorsFloralWhite           = 0FFFFFAF0h
ColorsForestGreen           = 0FF228B22h
ColorsFuchsia               = 0FFFF00FFh
ColorsGainsboro             = 0FFDCDCDCh
ColorsGhostWhite            = 0FFF8F8FFh
ColorsGold                  = 0FFFFD700h
ColorsGoldenrod             = 0FFDAA520h
ColorsGray                  = 0FF808080h
ColorsGreen                 = 0FF008000h
ColorsGreenYellow           = 0FFADFF2Fh
ColorsHoneydew              = 0FFF0FFF0h
ColorsHotPink               = 0FFFF69B4h
ColorsIndianRed             = 0FFCD5C5Ch
ColorsIndigo                = 0FF4B0082h
ColorsIvory                 = 0FFFFFFF0h
ColorsKhaki                 = 0FFF0E68Ch
ColorsLavender              = 0FFE6E6FAh
ColorsLavenderBlush         = 0FFFFF0F5h
ColorsLawnGreen             = 0FF7CFC00h
ColorsLemonChiffon          = 0FFFFFACDh
ColorsLightBlue             = 0FFADD8E6h
ColorsLightCoral            = 0FFF08080h
ColorsLightCyan             = 0FFE0FFFFh
ColorsLightGoldenrodYellow  = 0FFFAFAD2h
ColorsLightGray             = 0FFD3D3D3h
ColorsLightGreen            = 0FF90EE90h
ColorsLightPink             = 0FFFFB6C1h
ColorsLightSalmon           = 0FFFFA07Ah
ColorsLightSeaGreen         = 0FF20B2AAh
ColorsLightSkyBlue          = 0FF87CEFAh
ColorsLightSlateGray        = 0FF778899h
ColorsLightSteelBlue        = 0FFB0C4DEh
ColorsLightYellow           = 0FFFFFFE0h
ColorsLime                  = 0FF00FF00h
ColorsLimeGreen             = 0FF32CD32h
ColorsLinen                 = 0FFFAF0E6h
ColorsMagenta               = 0FFFF00FFh
ColorsMaroon                = 0FF800000h
ColorsMediumAquamarine      = 0FF66CDAAh
ColorsMediumBlue            = 0FF0000CDh
ColorsMediumOrchid          = 0FFBA55D3h
ColorsMediumPurple          = 0FF9370DBh
ColorsMediumSeaGreen        = 0FF3CB371h
ColorsMediumSlateBlue       = 0FF7B68EEh
ColorsMediumSpringGreen     = 0FF00FA9Ah
ColorsMediumTurquoise       = 0FF48D1CCh
ColorsMediumVioletRed       = 0FFC71585h
ColorsMidnightBlue          = 0FF191970h
ColorsMintCream             = 0FFF5FFFAh
ColorsMistyRose             = 0FFFFE4E1h
ColorsMoccasin              = 0FFFFE4B5h
ColorsNavajoWhite           = 0FFFFDEADh
ColorsNavy                  = 0FF000080h
ColorsOldLace               = 0FFFDF5E6h
ColorsOlive                 = 0FF808000h
ColorsOliveDrab             = 0FF6B8E23h
ColorsOrange                = 0FFFFA500h
ColorsOrangeRed             = 0FFFF4500h
ColorsOrchid                = 0FFDA70D6h
ColorsPaleGoldenrod         = 0FFEEE8AAh
ColorsPaleGreen             = 0FF98FB98h
ColorsPaleTurquoise         = 0FFAFEEEEh
ColorsPaleVioletRed         = 0FFDB7093h
ColorsPapayaWhip            = 0FFFFEFD5h
ColorsPeachPuff             = 0FFFFDAB9h
ColorsPeru                  = 0FFCD853Fh
ColorsPink                  = 0FFFFC0CBh
ColorsPlum                  = 0FFDDA0DDh
ColorsPowderBlue            = 0FFB0E0E6h
ColorsPurple                = 0FF800080h
ColorsRed                   = 0FFFF0000h
ColorsRosyBrown             = 0FFBC8F8Fh
ColorsRoyalBlue             = 0FF4169E1h
ColorsSaddleBrown           = 0FF8B4513h
ColorsSalmon                = 0FFFA8072h
ColorsSandyBrown            = 0FFF4A460h
ColorsSeaGreen              = 0FF2E8B57h
ColorsSeaShell              = 0FFFFF5EEh
ColorsSienna                = 0FFA0522Dh
ColorsSilver                = 0FFC0C0C0h
ColorsSkyBlue               = 0FF87CEEBh
ColorsSlateBlue             = 0FF6A5ACDh
ColorsSlateGray             = 0FF708090h
ColorsSnow                  = 0FFFFFAFAh
ColorsSpringGreen           = 0FF00FF7Fh
ColorsSteelBlue             = 0FF4682B4h
ColorsTan                   = 0FFD2B48Ch
ColorsTeal                  = 0FF008080h
ColorsThistle               = 0FFD8BFD8h
ColorsTomato                = 0FFFF6347h
ColorsTransparent           = 0FFFFFFh
ColorsTurquoise             = 0FF40E0D0h
ColorsViolet                = 0FFEE82EEh
ColorsWheat                 = 0FFF5DEB3h
ColorsWhite                 = 0FFFFFFFFh
ColorsWhiteSmoke            = 0FFF5F5F5h
ColorsYellow                = 0FFFFFF00h
ColorsYellowGreen           = 0FF9ACD32h


GpStatusOk                          = 0
GpStatusGenericError                = 1
GpStatusInvalidParameter            = 2
GpStatusOutOfMemory                 = 3
GpStatusObjectBusy                  = 4
GpStatusInsufficientBuffer          = 5
GpStatusNotImplemented              = 6
GpStatusWin32Error                  = 7
GpStatusWrongState                  = 8
GpStatusAborted                     = 9
GpStatusFileNotFound                = 10
GpStatusValueOverflow               = 11
GpStatusAccessDenied                = 12
GpStatusUnknownImageFormat          = 13
GpStatusFontFamilyNotFound          = 14
GpStatusFontStyleNotFound           = 15
GpStatusNotTrueTypeFont             = 16
GpStatusUnsupportedGdiplusVersion   = 17
GpStatusGdiplusNotInitialized       = 18
GpStatusPropertyNotFound            = 19
GpStatusPropertyNotSupported        = 20


QualityModeInvalid  = -1
QualityModeDefault  = 0
QualityModeLow      = 1
QualityModeHigh     = 2


CompositingModeSourceOver   = 0
CompositingModeSourceCopy   = 1


CompositingQualityInvalid           = QualityModeInvalid
CompositingQualityDefault           = QualityModeDefault
CompositingQualityHighSpeed         = QualityModeLow
CompositingQualityHighQuality       = QualityModeHigh
CompositingQualityGammaCorrected    = 3
CompositingQualityAssumeLinear      = 4


GenericFontFamilySerif      = 0
GenericFontFamilySansSerif  = 1
GenericFontFamilyMonospace  = 2


FontStyleRegular    = 0
FontStyleBold       = 1
FontStyleItalic     = 2
FontStyleBoldItalic = 3
FontStyleUnderline  = 4
FontStyleStrikeout  = 8

SmoothingModeInvalid        = QualityModeInvalid
SmoothingModeDefault        = QualityModeDefault
SmoothingModeHighSpeed      = QualityModeLow
SmoothingModeHighQuality    = QualityModeHigh
SmoothingModeNone           = 3
SmoothingModeAntiAlias      = 4

FillModeAlternate   = 0
FillModeWinding     = 1

InterpolationModeInvalid                = QualityModeInvalid
InterpolationModeDefault                = QualityModeDefault
InterpolationModeLowQuality             = QualityModeLow
InterpolationModeHighQuality            = QualityModeHigh
InterpolationModeBilinear               = 3
InterpolationModeBicubic                = 4
InterpolationModeNearestNeighbor        = 5
InterpolationModeHighQualityBilinear    = 6
InterpolationModeHighQualityBicubic     = 7


WrapModeTile            = 0
WrapModeTileFlipX       = 1
WrapModeTileFlipY       = 2
WrapModeTileFlipXY      = 3
WrapModeClamp           = 4

LinearGradientModeHorizontal        = 0
LinearGradientModeVertical          = 1
LinearGradientModeForwardDiagonal   = 2
LinearGradientModeBackwardDiagonal  = 3

ImageTypeUnknown    = 0
ImageTypeBitmap     = 1
ImageTypeMetafile   = 2


HatchStyleHorizontal                = 0
HatchStyleVertical                  = 1
HatchStyleForwardDiagonal           = 2
HatchStyleBackwardDiagonal          = 3
HatchStyleCross                     = 4
HatchStyleDiagonalCross             = 5
HatchStyle05Percent                 = 6
HatchStyle10Percent                 = 7
HatchStyle20Percent                 = 8
HatchStyle25Percent                 = 9
HatchStyle30Percent                 = 10
HatchStyle40Percent                 = 11
HatchStyle50Percent                 = 12
HatchStyle60Percent                 = 13
HatchStyle70Percent                 = 14
HatchStyle75Percent                 = 15
HatchStyle80Percent                 = 16
HatchStyle90Percent                 = 17
HatchStyleLightDownwardDiagonal     = 18
HatchStyleLightUpwardDiagonal       = 19
HatchStyleDarkDownwardDiagonal      = 20
HatchStyleDarkUpwardDiagonal        = 21
HatchStyleWideDownwardDiagonal      = 22
HatchStyleWideUpwardDiagonal        = 23
HatchStyleLightVertical             = 24
HatchStyleLightHorizontal           = 25
HatchStyleNarrowVertical            = 26
HatchStyleNarrowHorizontal          = 27
HatchStyleDarkVertical              = 28
HatchStyleDarkHorizontal            = 29
HatchStyleDashedDownwardDiagonal    = 30
HatchStyleDashedUpwardDiagonal      = 31
HatchStyleDashedHorizontal          = 32
HatchStyleDashedVertical            = 33
HatchStyleSmallConfetti             = 34
HatchStyleLargeConfetti             = 35
HatchStyleZigZag                    = 36
HatchStyleWave                      = 37
HatchStyleDiagonalBrick             = 38
HatchStyleHorizontalBrick           = 39
HatchStyleWeave                     = 40
HatchStylePlaid                     = 41
HatchStyleDivot                     = 42
HatchStyleDottedGrid                = 43
HatchStyleDottedDiamond             = 44
HatchStyleShingle                   = 45
HatchStyleTrellis                   = 46
HatchStyleSphere                    = 47
HatchStyleSmallGrid                 = 48
HatchStyleSmallCheckerBoard         = 49
HatchStyleLargeCheckerBoard         = 50
HatchStyleOutlinedDiamond           = 51
HatchStyleSolidDiamond              = 52
HatchStyleTotal                     = 53
HatchStyleLargeGrid                 = HatchStyleCross
HatchStyleMin                       = HatchStyleHorizontal
HatchStyleMax                       = HatchStyleTotal - 1


MatrixOrderPrepend  = 0
MatrixOrderAppend   = 1


ColorAdjustTypeDefault  = 0
ColorAdjustTypeBitmap   = 1
ColorAdjustTypeBrush    = 2
ColorAdjustTypePen      = 3
ColorAdjustTypeText     = 4
ColorAdjustTypeCount    = 5
ColorAdjustTypeAny      = 6

ColorChannelFlagsC          = 0
ColorChannelFlagsM          = 1
ColorChannelFlagsY          = 2
ColorChannelFlagsK          = 3
ColorChannelFlagsLast       = 4

ColorMatrixFlagsDefault     = 0
ColorMatrixFlagsSkipGrays   = 1
ColorMatrixFlagsAltGray     = 2

PenAlignmentCenter  = 0
PenAlignmentInset   = 1


BrushTypeSolidColor     = 0
BrushTypeHatchFill      = 1
BrushTypeTextureFill    = 2
BrushTypePathGradient   = 3
BrushTypeLinearGradient = 4


DashStyleSolid          = 0
DashStyleDash           = 1
DashStyleDot            = 2
DashStyleDashDot        = 3
DashStyleDashDotDot     = 4
DashStyleCustom         = 5

DashCapFlat             = 0
DashCapRound            = 2
DashCapTriangle         = 3

LineCapFlat             = 0
LineCapSquare           = 1
LineCapRound            = 2
LineCapTriangle         = 3
LineCapNoAnchor         = 010h
LineCapSquareAnchor     = 011h
LineCapRoundAnchor      = 012h
LineCapDiamondAnchor    = 013h
LineCapArrowAnchor      = 014h
LineCapCustom           = 0FFh
LineCapAnchorMask       = 0F0h


CustomLineCapTypeDefault            = 0
CustomLineCapTypeAdjustableArrow    = 1


LineJoinMiter           = 0
LineJoinBevel           = 1
LineJoinRound           = 2
LineJoinMiterClipped    = 3


PenTypeSolidColor       = BrushTypeSolidColor
PenTypeHatchFill        = BrushTypeHatchFill
PenTypeTextureFill      = BrushTypeTextureFill
PenTypePathGradient     = BrushTypePathGradient
PenTypeLinearGradient   = BrushTypeLinearGradient
PenTypeUnknown          = -1


WarpModePerspective     = 0
WarpModeBilinear        = 1


CombineModeReplace      = 0
CombineModeIntersect    = 1
CombineModeUnion        = 2
CombineModeXor          = 3
CombineModeExclude      = 4
CombineModeComplement   = 5

RotateNoneFlipNone      = 0
Rotate90FlipNone        = 1
Rotate180FlipNone       = 2
Rotate270FlipNone       = 3
RotateNoneFlipX         = 4
Rotate90FlipX           = 5
Rotate180FlipX          = 6
Rotate270FlipX          = 7
RotateNoneFlipY         = Rotate180FlipX
Rotate90FlipY           = Rotate270FlipX
Rotate180FlipY          = RotateNoneFlipX
Rotate270FlipY          = Rotate90FlipX
RotateNoneFlipXY        = Rotate180FlipNone
Rotate90FlipXY          = Rotate270FlipNone
Rotate180FlipXY         = RotateNoneFlipNone
Rotate270FlipXY         = Rotate90FlipNone


StringFormatFlagsDirectionRightToLeft   =  01h
StringFormatFlagsDirectionVertical      =  02h
StringFormatFlagsNoFitBlackBox          =  04h
StringFormatFlagsDisplayFormatControl   =  020h
StringFormatFlagsNoFontFallback         =  0400h
StringFormatFlagsMeasureTrailingSpaces  =  0800h
StringFormatFlagsNoWrap                 =  01000h
StringFormatFlagsLineLimit              =  02000h
StringFormatFlagsNoClip                 =  04000h

StringTrimmingNone                  =  0
StringTrimmingCharacter             =  1
StringTrimmingWord                  =  2
StringTrimmingEllipsisCharacter     =  3
StringTrimmingEllipsisWord          =  4
StringTrimmingEllipsisPath          =  5


StringDigitSubstituteUser           =  0
StringDigitSubstituteNone           =  1
StringDigitSubstituteNational       =  2
StringDigitSubstituteTraditional    =  3


HotkeyPrefixNone    =  0
HotkeyPrefixShow    =  1
HotkeyPrefixHide    =  2


StringAlignmentNear     =  0
StringAlignmentCenter   =  1
StringAlignmentFar      =  2

FlushIntentionFlush     =  0
FlushIntentionSync      =  1


EncoderParameterValueTypeByte           =  1
EncoderParameterValueTypeASCII          =  2
EncoderParameterValueTypeShort          =  3
EncoderParameterValueTypeLong           =  4
EncoderParameterValueTypeRational       =  5
EncoderParameterValueTypeLongRange      =  6
EncoderParameterValueTypeUndefined      =  7
EncoderParameterValueTypeRationalRange  =  8
EncoderValueColorTypeCMYK               =  0
EncoderValueColorTypeYCCK               =  1
EncoderValueCompressionLZW              =  2
EncoderValueCompressionCCITT3           =  3
EncoderValueCompressionCCITT4           =  4
EncoderValueCompressionRle              =  5
EncoderValueCompressionNone             =  6
EncoderValueScanMethodInterlaced        =  7
EncoderValueScanMethodNonInterlaced     =  8
EncoderValueVersionGif87                =  9
EncoderValueVersionGif89                =  10
EncoderValueRenderProgressive           =  11
EncoderValueRenderNonProgressive        =  12
EncoderValueTransformRotate90           =  13
EncoderValueTransformRotate180          =  14
EncoderValueTransformRotate270          =  15
EncoderValueTransformFlipHorizontal     =  16
EncoderValueTransformFlipVertical       =  17
EncoderValueMultiFrame                  =  18
EncoderValueLastFrame                   =  19
EncoderValueFlush                       =  20
EncoderValueFrameDimensionTime          =  21
EncoderValueFrameDimensionResolution    =  22
EncoderValueFrameDimensionPage          =  23
EncoderCompression                      =  0
EncoderColorDepth                       =  1
EncoderScanMethod                       =  2
EncoderVersion                          =  3
EncoderRenderMethod                     =  4
EncoderQuality                          =  5
EncoderTransformation                   =  6
EncoderLuminanceTable                   =  7
EncoderChrominanceTable                 =  8
EncoderSaveFlag                         =  9

PixelOffsetModeInvalid                  =  QualityModeInvalid
PixelOffsetModeDefault                  =  QualityModeDefault
PixelOffsetModeHighSpeed                =  QualityModeLow
PixelOffsetModeHighQuality              =  QualityModeHigh
PixelOffsetModeNone                     =  3
PixelOffsetModeHalf                     =  4

TextRenderingHintSystemDefault              =  0
TextRenderingHintSingleBitPerPixelGridFit   =  1
TextRenderingHintSingleBitPerPixel          =  2
TextRenderingHintAntiAliasGridFit           =  3
TextRenderingHintAntiAlias                  =  4
TextRenderingHintClearTypeGridFit           =  5

MetafileTypeInvalid         =  0
MetafileTypeWmf             =  1
MetafileTypeWmfPlaceable    =  2
MetafileTypeEmf             =  3
MetafileTypeEmfPlusOnly     =  4
MetafileTypeEmfPlusDual     =  5


EmfTypeEmfOnly          =  MetafileTypeEmf
EmfTypeEmfPlusOnly      =  MetafileTypeEmfPlusOnly
EmfTypeEmfPlusDual      =  MetafileTypeEmfPlusDual


ObjectTypeInvalid           =  0
ObjectTypeBrush             =  1
ObjectTypePen               =  2
ObjectTypePath              =  3
ObjectTypeRegion            =  4
ObjectTypeImage             =  5
ObjectTypeFont              =  6
ObjectTypeStringFormat      =  7
ObjectTypeImageAttributes   =  8
ObjectTypeCustomLineCap     =  9

ObjectTypeMax   =  ObjectTypeCustomLineCap
ObjectTypeMin   =  ObjectTypeBrush


MetafileFrameUnitPixel      =  UnitPixel
MetafileFrameUnitPoint      =  UnitPoint
MetafileFrameUnitInch       =  UnitInch
MetafileFrameUnitDocument   =  UnitDocument
MetafileFrameUnitMillimeter =  UnitMillimeter
MetafileFrameUnitGdi        =  7


CoordinateSpaceWorld    =  0
CoordinateSpacePage     =  1
CoordinateSpaceDevice   =  2

FlatnessDefault = 0.25

;;;; end gdiplus

include 'winextra.inc'

; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
; It is not recomended that WINDOWS.INC be modified but if you need to add
; equates or structures to WINDOWS.INC, do not write anything after the
; following conditional assembly directive that display the duplicate
; warning or it will be duplicated if the file is included more than once.
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««

;;;; directx

struct DDCOLORKEY
    dwColorSpaceLowValue    DWORD ?; // low boundary of color space that is to be treated as Color Key, inclusive
    dwColorSpaceHighValue   DWORD ?; // high boundary of color space that is to be treated as Color Key, inclusive
ends

struct DDSCAPS2
    dwCaps  DWORD ?; // capabilities of surface wanted
    dwCaps2 DWORD ?
    dwCaps3 DWORD ?
    union
        dwCaps4         DWORD ?
        dwVolumeDepth   DWORD ?
    ends
ends

struct DDPIXELFORMAT
    dwSize      DWORD ?; // size of structure
    dwFlags     DWORD ?; // pixel format flags
    dwFourCC    DWORD ?; // (FOURCC code)
    union
        dwRGBBitCount           DWORD ?; // how many bits per pixel
        dwYUVBitCount           DWORD ?; // how many bits per pixel
        dwZBufferBitDepth       DWORD ?; // how many total bits/pixel in z buffer (including any stencil bits)
        dwAlphaBitDepth         DWORD ?; // how many bits for alpha channels
        dwLuminanceBitCount     DWORD ?; // how many bits per pixel
        dwBumpBitCount          DWORD ?; // how many bits per "buxel", total
        dwPrivateFormatBitCount DWORD ?; // Bits per pixel of private driver formats. Only valid in texture
                                       ;// format list and if DDPF_D3DFORMAT is set
    ends
    union
        dwRBitMask          DWORD ?; // mask for red bit
        dwYBitMask          DWORD ?; // mask for Y bits
        dwStencilBitDepth   DWORD ?; // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits)
        dwLuminanceBitMask  DWORD ?; // mask for luminance bits
        dwBumpDuBitMask     DWORD ?; // mask for bump map U delta bits
        dwOperations        DWORD ?; // DDPF_D3DFORMAT Operations
    ends
    union
        dwGBitMask      DWORD ?; // mask for green bits
        dwUBitMask      DWORD ?; // mask for U bits
        dwZBitMask      DWORD ?; // mask for Z bits
        dwBumpDvBitMask DWORD ?; // mask for bump map V delta bits
        struct
            wFlipMSTypes    WORD ?; // Multisample methods supported via flip for this D3DFORMAT
            wBltMSTypes     WORD ?; // Multisample methods supported via blt for this D3DFORMAT
        ends
    ends
    union
        dwBBitMask              DWORD ?; // mask for blue bits
        dwVBitMask              DWORD ?; // mask for V bits
        dwStencilBitMask        DWORD ?; // mask for stencil bits
        dwBumpLuminanceBitMask  DWORD ?; // mask for luminance in bump map
    ends
    union
        dwRGBAlphaBitMask       DWORD ?; // mask for alpha channel
        dwYUVAlphaBitMask       DWORD ?; // mask for alpha channel
        dwLuminanceAlphaBitMask DWORD ?; // mask for alpha channel
        dwRGBZBitMask           DWORD ?; // mask for Z channel
        dwYUVZBitMask           DWORD ?; // mask for Z channel
    ends
ends

struct DDSURFACEDESC2
    dwSize      DWORD ?; // size of the DDSURFACEDESC structure
    dwFlags     DWORD ?; // determines what fields are valid
    dwHeight    DWORD ?; // height of surface to be created
    dwWidth     DWORD ?; // width of input surface
    union
        lPitch          LONG ?; // distance to start of next line (return value only)
        dwLinearSize    DWORD ?; // Formless late-allocated optimized surface size
    ends
    union
        dwBackBufferCount   DWORD ?; // number of back buffers requested
        dwDepth             DWORD ?; // the depth if this is a volume texture
    ends
    union
        dwMipMapCount   DWORD ?; // number of mip-map levels requestde
                               ; // dwZBufferBitDepth removed, use ddpfPixelFormat one instead
        dwRefreshRate   DWORD ?; // refresh rate (used when display mode is described)
        dwSrcVBHandle   DWORD ?; // The source used in VB::Optimize
    ends
    dwAlphaBitDepth DWORD ?; // depth of alpha buffer requested
    dwReserved      DWORD ?; // reserved
    lpSurface       LPVOID ?; // pointer to the associated surface memory
    union
        ddckCKDestOverlay   DDCOLORKEY; // color key for destination overlay use
        dwEmptyFaceColor    DWORD ?; // Physical color for empty cubemap faces
    ends
    ddckCKDestBlt       DDCOLORKEY; // color key for destination blt use
    ddckCKSrcOverlay    DDCOLORKEY; // color key for source overlay use
    ddckCKSrcBlt        DDCOLORKEY; // color key for source blt use
    union
        ddpfPixelFormat DDPIXELFORMAT; // pixel format description of the surface
        dwFVF           DWORD ?      ; // vertex format description of vertex buffers
    ends
    ddsCaps         DDSCAPS2 ?; // direct draw surface capabilities
    dwTextureStage  DWORD ?   ; // stage in multitexture cascade
ends

TYPEDEF LPDIRECTDRAWSURFACE, PVOID

struct DDBLTFX
    dwSize                  DWORD ?; // size of structure
    dwDDFX                  DWORD ?; // FX operations
    dwROP                   DWORD ?; // Win32 raster operations
    dwDDROP                 DWORD ?; // Raster operations new for DirectDraw
    dwRotationAngle         DWORD ?; // Rotation angle for blt
    dwZBufferOpCode         DWORD ?; // ZBuffer compares
    dwZBufferLow            DWORD ?; // Low limit of Z buffer
    dwZBufferHigh           DWORD ?; // High limit of Z buffer
    dwZBufferBaseDest       DWORD ?; // Destination base value
    dwZDestConstBitDepth    DWORD ?; // Bit depth used to specify Z constant for destination
    union
        dwZDestConst        DWORD ?; // Constant to use as Z buffer for dest
        lpDDSZBufferDest    LPDIRECTDRAWSURFACE ?; // Surface to use as Z buffer for dest
    ends
    dwZSrcConstBitDepth     DWORD ?; // Bit depth used to specify Z constant for source
    union
        dwZSrcConst         DWORD ?; // Constant to use as Z buffer for src
        lpDDSZBufferSrc     LPDIRECTDRAWSURFACE ?; // Surface to use as Z buffer for src
    ends
    dwAlphaEdgeBlendBitDepth    DWORD ?; // Bit depth used to specify constant for alpha edge blend
    dwAlphaEdgeBlend            DWORD ?; // Alpha for edge blending
    dwReserved                  DWORD ?
    dwAlphaDestConstBitDepth    DWORD ?; // Bit depth used to specify alpha constant for destination
    union
        dwAlphaDestConst    DWORD ?; // Constant to use as Alpha Channel
        lpDDSAlphaDest      LPDIRECTDRAWSURFACE ?; // Surface to use as Alpha Channel
    ends
    dwAlphaSrcConstBitDepth DWORD ?; // Bit depth used to specify alpha constant for source
    union
        dwAlphaSrcConst DWORD ?; // Constant to use as Alpha Channel
        lpDDSAlphaSrc   LPDIRECTDRAWSURFACE ?; // Surface to use as Alpha Channel
    ends
    union
        dwFillColor     DWORD ?; // color in RGB or Palettized
        dwFillDepth     DWORD ?; // depth value for z-buffer
        dwFillPixel     DWORD ?; // pixel value for RGBA or RGBZ
        lpDDSPattern    LPDIRECTDRAWSURFACE ?; // Surface to use as pattern
    ends
    ddckDestColorkey    DDCOLORKEY; // DestColorkey override
    ddckSrcColorkey     DDCOLORKEY; // SrcColorkey override
ends
TYPEDEF LPDDBLTFX, PVOID